From: Alexander Graf <agraf@suse.de>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: kvm list <kvm@vger.kernel.org>, Nick Piggin <npiggin@suse.de>,
Glauber Costa <glommer@redhat.com>, Avi Kivity <avi@redhat.com>,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 1/3] Split paravirt ops by functionality
Date: Thu, 19 Nov 2009 16:21:28 +0100 [thread overview]
Message-ID: <4B056278.2030306@suse.de> (raw)
In-Reply-To: <4B055D65.2000201@goop.org>
Jeremy Fitzhardinge wrote:
> On 11/18/09 08:13, Alexander Graf wrote:
>
>> Currently when using paravirt ops it's an all-or-nothing option. We can either
>> use pv-ops for CPU, MMU, timing, etc. or not at all.
>>
>> Now there are some use cases where we don't need the full feature set, but only
>> a small chunk of it. KVM is a pretty prominent example for this.
>>
>> So let's make everything a bit more fine-grained. We already have a splitting
>> by function groups, namely "cpu", "mmu", "time", "irq", "apic" and "spinlock".
>>
>> Taking that existing splitting and extending it to only compile in the PV
>> capable bits sounded like a natural fit. That way we don't get performance hits
>> in MMU code from using the KVM PV clock which only needs the TIME parts of
>> pv-ops.
>>
>> We define a new CONFIG_PARAVIRT_ALL option that basically does the same thing
>> the CONFIG_PARAVIRT did before this splitting. We move all users of
>> CONFIG_PARAVIRT to CONFIG_PARAVIRT_ALL, so they behave the same way they did
>> before.
>>
>> So here it is - the splitting! I would have made the patch smaller, but this
>> was the closest I could get to atomic (for bisect) while staying sane.
>>
>>
>
> The basic idea seems pretty sane. I'm wondering how much compile test
> coverage you've given all these extra config options; there are now a
> lot more combinations, and your use of select is particularly worrying
> because they don't propagate dependencies properly.
>
Uh - I don't see where there should be any dependencies.
> For example, does this actually work?
>
>> config XEN
>> bool "Xen guest support"
>> - select PARAVIRT
>> + select PARAVIRT_ALL
>> select PARAVIRT_CLOCK
>> depends on X86_64 || (X86_32 && X86_PAE && !X86_VISWS)
>> depends on X86_CMPXCHG && X86_TSC
>>
>>
> Does selecting PARAVIRT_ALL end up selecting all the other PARAVIRT_*?
>
> Can you reassure me?
>
> +config PARAVIRT_ALL
> + bool
> + select PARAVIRT_CPU
> + select PARAVIRT_TIME
> + select PARAVIRT_IRQ
> + select PARAVIRT_APIC
> + select PARAVIRT_MMU
> + default n
> +
So selecting PARAVIRT_ALL selects all the other split PARAVIRT parts
that in turn select PARAVIRT. I tested a compile on x86_64 with Xen DomU
support enabled and it compiled fine :-).
> Also, I think VMI is the only serious user of PARAVIRT_APIC, so we can
> mark that to go when VMI does.
>
Sounds good :-). So the patch even serves as a helper for anyone who'll
remove that support later.
> What ends up using plain CONFIG_PARAVIRT? Do we still need it?
>
It's used for an info field that says which hypervisor we're running on
and as config option to know if we need to include the binary patch
magic. As soon as a single sub-paravirt option is selected, we need that
to make sure we have the framework in place.
Alex
next prev parent reply other threads:[~2009-11-19 15:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-18 0:13 [PATCH 0/3] Split up pv-ops Alexander Graf
2009-11-18 0:13 ` [PATCH 1/3] Split paravirt ops by functionality Alexander Graf
2009-11-19 14:59 ` Jeremy Fitzhardinge
2009-11-19 15:21 ` Alexander Graf [this message]
2009-11-18 0:13 ` [PATCH 2/3] Only export selected pv-ops feature structs Alexander Graf
2009-11-18 0:13 ` [PATCH 3/3] Split the KVM pv-ops support by feature Alexander Graf
2009-11-18 1:33 ` Rusty Russell
2009-11-18 1:37 ` Alexander Graf
2009-11-19 7:42 ` [PATCH 0/3] Split up pv-ops Avi Kivity
2009-12-03 14:52 ` Alexander Graf
2009-12-03 15:00 ` Avi Kivity
2009-12-03 15:04 ` Alexander Graf
2009-12-03 15:07 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B056278.2030306@suse.de \
--to=agraf@suse.de \
--cc=avi@redhat.com \
--cc=glommer@redhat.com \
--cc=jeremy@goop.org \
--cc=kvm@vger.kernel.org \
--cc=npiggin@suse.de \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox