qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics?
@ 2012-01-19 12:46 Jan Kiszka
  2012-01-19 13:24 ` Alexander Graf
  2012-01-19 17:28 ` Marcelo Tosatti
  0 siblings, 2 replies; 13+ messages in thread
From: Jan Kiszka @ 2012-01-19 12:46 UTC (permalink / raw)
  To: kvm; +Cc: qemu-devel

Hi again,

do we need some KVM knob comparable to qemu-kvm's -kvm-shadow-memory in
upstream?

If yes: The underlying IOCTL is x86-only. Are other archs interested in
this long-term as well, ie. should the control become arch-independent?

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics?
  2012-01-19 12:46 [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics? Jan Kiszka
@ 2012-01-19 13:24 ` Alexander Graf
  2012-01-19 13:30   ` Jan Kiszka
  2012-01-19 17:28 ` Marcelo Tosatti
  1 sibling, 1 reply; 13+ messages in thread
From: Alexander Graf @ 2012-01-19 13:24 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, kvm



On 19.01.2012, at 13:46, Jan Kiszka <jan.kiszka@siemens.com> wrote:

> Hi again,
> 
> do we need some KVM knob comparable to qemu-kvm's -kvm-shadow-memory in
> upstream?

What does it do? Never heard of it :)

Alex

> 
> If yes: The underlying IOCTL is x86-only. Are other archs interested in
> this long-term as well, ie. should the control become arch-independent?
> 
> Jan
> 
> -- 
> Siemens AG, Corporate Technology, CT T DE IT 1
> Corporate Competence Center Embedded Linux
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics?
  2012-01-19 13:24 ` Alexander Graf
@ 2012-01-19 13:30   ` Jan Kiszka
  2012-01-19 13:42     ` Alexander Graf
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2012-01-19 13:30 UTC (permalink / raw)
  To: Alexander Graf; +Cc: qemu-devel, kvm

On 2012-01-19 14:24, Alexander Graf wrote:
> 
> 
> On 19.01.2012, at 13:46, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> 
>> Hi again,
>>
>> do we need some KVM knob comparable to qemu-kvm's -kvm-shadow-memory in
>> upstream?
> 
> What does it do? Never heard of it :)

According to inline docs: "Chang[e] the number of mmu pages allocated to
the vm". That's from arch/x86/kvm/mmu.c, kvm_mmu_change_mmu_pages().
That's soft-MMU related so, I bet, of decreasing relevance for x86.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics?
  2012-01-19 13:30   ` Jan Kiszka
@ 2012-01-19 13:42     ` Alexander Graf
  0 siblings, 0 replies; 13+ messages in thread
From: Alexander Graf @ 2012-01-19 13:42 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, kvm


On 19.01.2012, at 14:30, Jan Kiszka wrote:

> On 2012-01-19 14:24, Alexander Graf wrote:
>> 
>> 
>> On 19.01.2012, at 13:46, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> 
>>> Hi again,
>>> 
>>> do we need some KVM knob comparable to qemu-kvm's -kvm-shadow-memory in
>>> upstream?
>> 
>> What does it do? Never heard of it :)
> 
> According to inline docs: "Chang[e] the number of mmu pages allocated to
> the vm". That's from arch/x86/kvm/mmu.c, kvm_mmu_change_mmu_pages().
> That's soft-MMU related so, I bet, of decreasing relevance for x86.

Ah, that's the maximum number of concurrently active pages we allow? Pretty cool, but it should be a monitor command rather than a command line option, no? And if we want it, we should have it available on other archs too, yes.


Alex

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics?
  2012-01-19 12:46 [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics? Jan Kiszka
  2012-01-19 13:24 ` Alexander Graf
@ 2012-01-19 17:28 ` Marcelo Tosatti
  2012-01-19 17:39   ` Jan Kiszka
  1 sibling, 1 reply; 13+ messages in thread
From: Marcelo Tosatti @ 2012-01-19 17:28 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, kvm

On Thu, Jan 19, 2012 at 01:46:39PM +0100, Jan Kiszka wrote:
> Hi again,
> 
> do we need some KVM knob comparable to qemu-kvm's -kvm-shadow-memory in
> upstream?
> 
> If yes: The underlying IOCTL is x86-only. Are other archs interested in
> this long-term as well, ie. should the control become arch-independent?
> 
> Jan

Last time i asked about removal, Avi wished for it to remain.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics?
  2012-01-19 17:28 ` Marcelo Tosatti
@ 2012-01-19 17:39   ` Jan Kiszka
  2012-01-25 11:38     ` Avi Kivity
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2012-01-19 17:39 UTC (permalink / raw)
  To: Marcelo Tosatti, Avi Kivity; +Cc: qemu-devel, kvm

On 2012-01-19 18:28, Marcelo Tosatti wrote:
> On Thu, Jan 19, 2012 at 01:46:39PM +0100, Jan Kiszka wrote:
>> Hi again,
>>
>> do we need some KVM knob comparable to qemu-kvm's -kvm-shadow-memory in
>> upstream?
>>
>> If yes: The underlying IOCTL is x86-only. Are other archs interested in
>> this long-term as well, ie. should the control become arch-independent?
>>
>> Jan
> 
> Last time i asked about removal, Avi wished for it to remain.
> 

Then I guess he should comment on this after returning to work. :)

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics?
  2012-01-19 17:39   ` Jan Kiszka
@ 2012-01-25 11:38     ` Avi Kivity
  2012-01-25 11:57       ` Jan Kiszka
  0 siblings, 1 reply; 13+ messages in thread
From: Avi Kivity @ 2012-01-25 11:38 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Marcelo Tosatti, qemu-devel, kvm

On 01/19/2012 07:39 PM, Jan Kiszka wrote:
> On 2012-01-19 18:28, Marcelo Tosatti wrote:
> > On Thu, Jan 19, 2012 at 01:46:39PM +0100, Jan Kiszka wrote:
> >> Hi again,
> >>
> >> do we need some KVM knob comparable to qemu-kvm's -kvm-shadow-memory in
> >> upstream?
> >>
> >> If yes: The underlying IOCTL is x86-only. Are other archs interested in
> >> this long-term as well, ie. should the control become arch-independent?
> >>
> >> Jan
> > 
> > Last time i asked about removal, Avi wished for it to remain.
> > 
>
> Then I guess he should comment on this after returning to work. :)

-kvm-shadow-memory is becoming less meaningful for ordinary workloads
since everything uses TDP these days.  It's still meaningful for testing
(forcing aggressive cache replacement), or perhaps nested virtualization.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics?
  2012-01-25 11:38     ` Avi Kivity
@ 2012-01-25 11:57       ` Jan Kiszka
  2012-01-25 12:04         ` Avi Kivity
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2012-01-25 11:57 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Marcelo Tosatti, qemu-devel, kvm

On 2012-01-25 12:38, Avi Kivity wrote:
> On 01/19/2012 07:39 PM, Jan Kiszka wrote:
>> On 2012-01-19 18:28, Marcelo Tosatti wrote:
>>> On Thu, Jan 19, 2012 at 01:46:39PM +0100, Jan Kiszka wrote:
>>>> Hi again,
>>>>
>>>> do we need some KVM knob comparable to qemu-kvm's -kvm-shadow-memory in
>>>> upstream?
>>>>
>>>> If yes: The underlying IOCTL is x86-only. Are other archs interested in
>>>> this long-term as well, ie. should the control become arch-independent?
>>>>
>>>> Jan
>>>
>>> Last time i asked about removal, Avi wished for it to remain.
>>>
>>
>> Then I guess he should comment on this after returning to work. :)
> 
> -kvm-shadow-memory is becoming less meaningful for ordinary workloads
> since everything uses TDP these days.  It's still meaningful for testing
> (forcing aggressive cache replacement), or perhaps nested virtualization.

So, is it used for testing in fact? Would a machine option
"kvm_shadow_memory=n" be desirable?

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics?
  2012-01-25 11:57       ` Jan Kiszka
@ 2012-01-25 12:04         ` Avi Kivity
  2012-01-25 12:10           ` Jan Kiszka
  0 siblings, 1 reply; 13+ messages in thread
From: Avi Kivity @ 2012-01-25 12:04 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Marcelo Tosatti, qemu-devel, kvm

On 01/25/2012 01:57 PM, Jan Kiszka wrote:
> > 
> > -kvm-shadow-memory is becoming less meaningful for ordinary workloads
> > since everything uses TDP these days.  It's still meaningful for testing
> > (forcing aggressive cache replacement), or perhaps nested virtualization.
>
> So, is it used for testing in fact? 

It is not, but it should be.  There's an extra_params option in
autotest, I'll start using it to stress the mmu some more, even though
it's going to slow things down for me.

> Would a machine option
> "kvm_shadow_memory=n" be desirable?

Not sure, this is a host option, not a guest option.  Machine options
should be guest-visible.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics?
  2012-01-25 12:04         ` Avi Kivity
@ 2012-01-25 12:10           ` Jan Kiszka
  2012-01-25 12:15             ` Avi Kivity
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2012-01-25 12:10 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Marcelo Tosatti, qemu-devel, kvm

On 2012-01-25 13:04, Avi Kivity wrote:
> On 01/25/2012 01:57 PM, Jan Kiszka wrote:
>>>
>>> -kvm-shadow-memory is becoming less meaningful for ordinary workloads
>>> since everything uses TDP these days.  It's still meaningful for testing
>>> (forcing aggressive cache replacement), or perhaps nested virtualization.
>>
>> So, is it used for testing in fact? 
> 
> It is not, but it should be.  There's an extra_params option in
> autotest, I'll start using it to stress the mmu some more, even though
> it's going to slow things down for me.

OK.

> 
>> Would a machine option
>> "kvm_shadow_memory=n" be desirable?
> 
> Not sure, this is a host option, not a guest option.  Machine options
> should be guest-visible.

machine options are not guest visible. Basically, this options falls
into the same category as kernel_irqchip.

Do we have alternatives? A top-level command line options is surely none.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics?
  2012-01-25 12:10           ` Jan Kiszka
@ 2012-01-25 12:15             ` Avi Kivity
  2012-01-25 12:26               ` Jan Kiszka
  0 siblings, 1 reply; 13+ messages in thread
From: Avi Kivity @ 2012-01-25 12:15 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Marcelo Tosatti, qemu-devel, kvm

On 01/25/2012 02:10 PM, Jan Kiszka wrote:
> > 
> >> Would a machine option
> >> "kvm_shadow_memory=n" be desirable?
> > 
> > Not sure, this is a host option, not a guest option.  Machine options
> > should be guest-visible.
>
> machine options are not guest visible. Basically, this options falls
> into the same category as kernel_irqchip.

They should be.  We should work hard to separate the guest ABI from
everything else.  Same as kvm-apic appearing in the qdev name.

> Do we have alternatives? A top-level command line options is surely none.

  -kvm shadow-memory=n,...

  -accel kvm,shadow-memory=n,...

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics?
  2012-01-25 12:15             ` Avi Kivity
@ 2012-01-25 12:26               ` Jan Kiszka
  2012-01-25 12:33                 ` Avi Kivity
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2012-01-25 12:26 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Marcelo Tosatti, qemu-devel, kvm

On 2012-01-25 13:15, Avi Kivity wrote:
> On 01/25/2012 02:10 PM, Jan Kiszka wrote:
>>>
>>>> Would a machine option
>>>> "kvm_shadow_memory=n" be desirable?
>>>
>>> Not sure, this is a host option, not a guest option.  Machine options
>>> should be guest-visible.
>>
>> machine options are not guest visible. Basically, this options falls
>> into the same category as kernel_irqchip.
> 
> They should be.  We should work hard to separate the guest ABI from
> everything else.  Same as kvm-apic appearing in the qdev name.

Which is NOT guest visible.

> 
>> Do we have alternatives? A top-level command line options is surely none.
> 
>   -kvm shadow-memory=n,...
> 
>   -accel kvm,shadow-memory=n,...

Both are unneeded additional options.

We already have -machine option=value. We just need to enable machines
like KVM-based ones to append their private ones to the common set. That
way you will get a proper error report when specifying a meaningless
combination like "accel=tcg,kernel_irqchip=on".

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics?
  2012-01-25 12:26               ` Jan Kiszka
@ 2012-01-25 12:33                 ` Avi Kivity
  0 siblings, 0 replies; 13+ messages in thread
From: Avi Kivity @ 2012-01-25 12:33 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Marcelo Tosatti, qemu-devel, kvm

On 01/25/2012 02:26 PM, Jan Kiszka wrote:
> On 2012-01-25 13:15, Avi Kivity wrote:
> > On 01/25/2012 02:10 PM, Jan Kiszka wrote:
> >>>
> >>>> Would a machine option
> >>>> "kvm_shadow_memory=n" be desirable?
> >>>
> >>> Not sure, this is a host option, not a guest option.  Machine options
> >>> should be guest-visible.
> >>
> >> machine options are not guest visible. Basically, this options falls
> >> into the same category as kernel_irqchip.
> > 
> > They should be.  We should work hard to separate the guest ABI from
> > everything else.  Same as kvm-apic appearing in the qdev name.
>
> Which is NOT guest visible.

Right.  I'm worried about some tool comparing the qdev/qom trees and
concluding two machines are different even though they are identical wrt
the guest.  Too be fair, that applies to attributes as well.

> > 
> >> Do we have alternatives? A top-level command line options is surely none.
> > 
> >   -kvm shadow-memory=n,...
> > 
> >   -accel kvm,shadow-memory=n,...
>
> Both are unneeded additional options.
>
> We already have -machine option=value. We just need to enable machines
> like KVM-based ones to append their private ones to the common set. That
> way you will get a proper error report when specifying a meaningless
> combination like "accel=tcg,kernel_irqchip=on".

Okay.  I have an uneasy feeling about machine options for this, but
nothing more.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-01-25 12:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-19 12:46 [Qemu-devel] qemu-kvm upstreaming: Do we want -kvm-shadow-memory semantics? Jan Kiszka
2012-01-19 13:24 ` Alexander Graf
2012-01-19 13:30   ` Jan Kiszka
2012-01-19 13:42     ` Alexander Graf
2012-01-19 17:28 ` Marcelo Tosatti
2012-01-19 17:39   ` Jan Kiszka
2012-01-25 11:38     ` Avi Kivity
2012-01-25 11:57       ` Jan Kiszka
2012-01-25 12:04         ` Avi Kivity
2012-01-25 12:10           ` Jan Kiszka
2012-01-25 12:15             ` Avi Kivity
2012-01-25 12:26               ` Jan Kiszka
2012-01-25 12:33                 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).