From: Avi Kivity on
On 04/16/2010 10:34 AM, Zhang, Yanmin wrote:
> Below is the kernel patch to enable perf to collect guest os statistics.
>
> Joerg,
>
> Would you like to add support on svm? I don't know the exact point to trigger
> NMI to host with svm.
>
> See below code with vmx:
>
> + kvm_before_handle_nmi(&vmx->vcpu);
> asm("int $2");
> + kvm_after_handle_nmi(&vmx->vcpu);
>
> Signed-off-by: Zhang Yanmin<yanmin_zhang(a)linux.intel.com>
>

Can you please split it further?

Patch 1 introduces perf_register_guest_info_callbacks() and related.
Ingo can merge this into a branch in tip.git.
Patch 2 is just the kvm bits, I'll apply that after merging the branch
with patch 1.
Patch 3 adds the tools/perf changes.

This way perf development can continue on tip.git, and kvm development
can continue on kvm.git, without the code bases diverging and requiring
a merge later.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Avi Kivity on
On 04/17/2010 10:13 PM, Ingo Molnar wrote:
> * Avi Kivity<avi(a)redhat.com> wrote:
>
>
>> On 04/16/2010 10:34 AM, Zhang, Yanmin wrote:
>>
>>> Below is the kernel patch to enable perf to collect guest os statistics.
>>>
>>> Joerg,
>>>
>>> Would you like to add support on svm? I don't know the exact point to trigger
>>> NMI to host with svm.
>>>
>>> See below code with vmx:
>>>
>>> + kvm_before_handle_nmi(&vmx->vcpu);
>>> asm("int $2");
>>> + kvm_after_handle_nmi(&vmx->vcpu);
>>>
>>> Signed-off-by: Zhang Yanmin<yanmin_zhang(a)linux.intel.com>
>>>
>> Can you please split it further?
>>
>> Patch 1 introduces perf_register_guest_info_callbacks() and related. Ingo
>> can merge this into a branch in tip.git. Patch 2 is just the kvm bits, I'll
>> apply that after merging the branch with patch 1. Patch 3 adds the
>> tools/perf changes.
>>
>> This way perf development can continue on tip.git, and kvm development can
>> continue on kvm.git, without the code bases diverging and requiring a merge
>> later.
>>
> I'd like to pull the KVM bits from you into perf - so that there's a testable
> form of the changes. We can do that via a branch that has 1-2 changes, plus
> minimal conflicts down the line, right?
>

We can try doing this (currently we don't, but this is simple enough
that we could). I'd still like 1-2 in two patches.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Avi Kivity on
On 04/19/2010 08:32 AM, Zhang, Yanmin wrote:
> Below patch introduces perf_guest_info_callbacks and related register/unregister
> functions. Add more PERF_RECORD_MISC_XXX bits meaning guest kernel and guest user
> space.
>

This doesn't apply against upstream. What branch was this generated
against?

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Zhang, Yanmin on
On Mon, 2010-04-19 at 11:37 +0300, Avi Kivity wrote:
> On 04/19/2010 08:32 AM, Zhang, Yanmin wrote:
> > Below patch introduces perf_guest_info_callbacks and related register/unregister
> > functions. Add more PERF_RECORD_MISC_XXX bits meaning guest kernel and guest user
> > space.
> >
>
> This doesn't apply against upstream.
What does upstream mean here? The vanilla 2.6.34-rc4?

> What branch was this generated
> against?
>
It's against the latest tip/master. I checked out to 19b26586090 as the latest
tip/master has some updates on perf.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Avi Kivity on
On 04/19/2010 11:59 AM, Avi Kivity wrote:
>
>>> What branch was this generated
>>> against?
>>>
>> It's against the latest tip/master. I checked out to 19b26586090 as
>> the latest
>> tip/master has some updates on perf.
>
> I don't want to merge tip/master... does tip/perf/core contain the
> needed updates?
>

Note, given that there won't be changes to NMI handling in kvm, we can
go the simpler route of merging all the patches in tip/perf/core.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/