public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* kvm warning
@ 2007-08-08 22:14 Andrew Morton
  2007-08-08 22:19 ` Ingo Molnar
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2007-08-08 22:14 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel, linux-kernel, Ingo Molnar


ia64 allmodconfig says

drivers/kvm/Kconfig:14:warning: 'select' used by config symbol 'KVM' refers to undefined symbol 'PREEMPT_NOTIFIERS'

Because of

commit 8928fb48c7a7f9053a55f1d0023cbc533f2b3663
Author: Avi Kivity <avi@qumranet.com>
Date:   Wed Jul 11 18:17:21 2007 +0300

    KVM: Use the scheduler preemption notifiers to make kvm preemptible
    
    Current kvm disables preemption while the new virtualization registers are
    in use.  This of course is not very good for latency sensitive workloads (on
    use of virtualization is to offload user interface and other latency
    insensitive stuff to a container, so that it is easier to analyze the
    remaining workload).  This patch re-enables preemption for kvm; preemption
    is now only disabled when switching the registers in and out, and during
    the switch to guest mode and back.
    
    Contains fixes from Shaohua Li <shaohua.li@intel.com>.
    
    Signed-off-by: Avi Kivity <avi@qumranet.com>

--- a/drivers/kvm/Kconfig
+++ b/drivers/kvm/Kconfig
@@ -11,6 +11,7 @@ if VIRTUALIZATION
 config KVM
        tristate "Kernel-based Virtual Machine (KVM) support"
        depends on X86 && EXPERIMENTAL
+       select PREEMPT_NOTIFIERS
        select ANON_INODES
        ---help---
          Support hosting fully virtualized guest machines using hardware
...


a) is kvm supported on ia64 at all??

b) `select' is evil.  Just Don't Do It.

c) `select' is especially evil when it's done on some kernel-internal
   secret symbol like PREEMPT_NOTIFIERS.

d) I can't see anything else in the kernel which sets or clears
   PREEMPT_NOTIFIERS so I'm rather wonderring why the config option exists
   at all.

e) sched developers may not like KVM reaching over and twiddling their
   knobs for them.


It all needs more thought, I think...


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

* Re: kvm warning
  2007-08-08 22:14 kvm warning Andrew Morton
@ 2007-08-08 22:19 ` Ingo Molnar
  2007-08-08 22:48   ` Avi Kivity
  0 siblings, 1 reply; 8+ messages in thread
From: Ingo Molnar @ 2007-08-08 22:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Avi Kivity, kvm-devel, linux-kernel


* Andrew Morton <akpm@linux-foundation.org> wrote:

> ia64 allmodconfig says
> 
> drivers/kvm/Kconfig:14:warning: 'select' used by config symbol 'KVM' 
> refers to undefined symbol 'PREEMPT_NOTIFIERS'

hm, why doesnt ia64 pick up kernel/Kconfig.preempt, like all the other 
arches? Due to that ia64 also misses out on voluntary preempt and on 
preempt-bkl.

	Ingo

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

* Re: kvm warning
  2007-08-08 22:19 ` Ingo Molnar
@ 2007-08-08 22:48   ` Avi Kivity
  2007-08-08 22:59     ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Avi Kivity @ 2007-08-08 22:48 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Andrew Morton, kvm-devel, linux-kernel

Ingo Molnar wrote:
> * Andrew Morton <akpm@linux-foundation.org> wrote:
>
>   
>> ia64 allmodconfig says
>>
>> drivers/kvm/Kconfig:14:warning: 'select' used by config symbol 'KVM' 
>> refers to undefined symbol 'PREEMPT_NOTIFIERS'
>>     
>
> hm, why doesnt ia64 pick up kernel/Kconfig.preempt, like all the other 
> arches? Due to that ia64 also misses out on voluntary preempt and on 
> preempt-bkl.
>
>   

Even more hm, how does ia64 manage to enable kvm?  It 'depends on X86' 
at this moment.



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

* Re: kvm warning
  2007-08-08 22:48   ` Avi Kivity
@ 2007-08-08 22:59     ` Andrew Morton
  2007-08-08 23:09       ` Avi Kivity
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2007-08-08 22:59 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Ingo Molnar, kvm-devel, linux-kernel

On Thu, 09 Aug 2007 01:48:07 +0300
Avi Kivity <avi@qumranet.com> wrote:

> Ingo Molnar wrote:
> > * Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> >   
> >> ia64 allmodconfig says
> >>
> >> drivers/kvm/Kconfig:14:warning: 'select' used by config symbol 'KVM' 
> >> refers to undefined symbol 'PREEMPT_NOTIFIERS'
> >>     
> >
> > hm, why doesnt ia64 pick up kernel/Kconfig.preempt, like all the other 
> > arches? Due to that ia64 also misses out on voluntary preempt and on 
> > preempt-bkl.
> >
> >   
> 
> Even more hm, how does ia64 manage to enable kvm?  It 'depends on X86' 
> at this moment.
> 

beats me.  CONFIG_KVM doesn't get set.  But it seems that kconfig wants
to do error-checking on that item anyway.



btw, testing of Kconfig can be done for any architecture without
installation of a toolchain for that architecture.  Set $ARCH and run
mrproper then use menuconfig/oldconfig/allmodconfig/allconfig as usual.

Judging by the number of Kconfig problem I see, this is a big secret ;)

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

* Re: kvm warning
  2007-08-08 22:59     ` Andrew Morton
@ 2007-08-08 23:09       ` Avi Kivity
  2007-08-13 17:31         ` Satyam Sharma
  0 siblings, 1 reply; 8+ messages in thread
From: Avi Kivity @ 2007-08-08 23:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Ingo Molnar, kvm-devel, linux-kernel

Andrew Morton wrote:
> On Thu, 09 Aug 2007 01:48:07 +0300
> Avi Kivity <avi@qumranet.com> wrote:
>
>   
>> Ingo Molnar wrote:
>>     
>>> * Andrew Morton <akpm@linux-foundation.org> wrote:
>>>
>>>   
>>>       
>>>> ia64 allmodconfig says
>>>>
>>>> drivers/kvm/Kconfig:14:warning: 'select' used by config symbol 'KVM' 
>>>> refers to undefined symbol 'PREEMPT_NOTIFIERS'
>>>>     
>>>>         
>>> hm, why doesnt ia64 pick up kernel/Kconfig.preempt, like all the other 
>>> arches? Due to that ia64 also misses out on voluntary preempt and on 
>>> preempt-bkl.
>>>
>>>   
>>>       
>> Even more hm, how does ia64 manage to enable kvm?  It 'depends on X86' 
>> at this moment.
>>
>>     
>
> beats me.  CONFIG_KVM doesn't get set.  But it seems that kconfig wants
> to do error-checking on that item anyway.
>
>
>   

I could do a 'select PREEMPT_NOTIFIERS if X86' but it seems silly.  I'd 
call it a Kconfig bug.




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

* Re: kvm warning
  2007-08-08 23:09       ` Avi Kivity
@ 2007-08-13 17:31         ` Satyam Sharma
  2007-08-13 17:37           ` Luck, Tony
  0 siblings, 1 reply; 8+ messages in thread
From: Satyam Sharma @ 2007-08-13 17:31 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Andrew Morton, Ingo Molnar, kvm-devel, linux-kernel, tony.luck

On 8/9/07, Avi Kivity <avi@qumranet.com> wrote:
> Andrew Morton wrote:
> > On Thu, 09 Aug 2007 01:48:07 +0300
> > Avi Kivity <avi@qumranet.com> wrote:
> >
> >> Ingo Molnar wrote:
> >>
> >>> * Andrew Morton <akpm@linux-foundation.org> wrote:
> >>>
> >>>> ia64 allmodconfig says
> >>>>
> >>>> drivers/kvm/Kconfig:14:warning: 'select' used by config symbol 'KVM'
> >>>> refers to undefined symbol 'PREEMPT_NOTIFIERS'
> >>>>
> >>> hm, why doesnt ia64 pick up kernel/Kconfig.preempt, like all the other
> >>> arches? Due to that ia64 also misses out on voluntary preempt and on
> >>> preempt-bkl.
> >>>
> >> Even more hm, how does ia64 manage to enable kvm?  It 'depends on X86'
> >> at this moment.
> >
> > beats me.  CONFIG_KVM doesn't get set.  But it seems that kconfig wants
> > to do error-checking on that item anyway.
>
> I could do a 'select PREEMPT_NOTIFIERS if X86' but it seems silly.  I'd
> call it a Kconfig bug.

I remember this issue well [1] ... it's a Kconfig deficiency indeed. Basically
kconfig options for generic stuff cannot use "select" for symbols that are
defined only for specific archs (here ia64 synthetically created this situation
by failing to source "kernel/Kconfig.preempt" in its arch/ia64/Kconfig).
Leads to no real build problems, but causes these bogus warnings to
be printed on other archs (that don't have that symbol visible to them).

Possible solutions could be to (1) source "kernel/Kconfig.preempt" from
arch/ia64/Kconfig, or (2) Use "default y if KVM" for PREEMPT_NOTIFIERS
(but this would be kludgy, horrible and tasteless). I'm not sure if
"select PREEMPT_NOTIFIERS if X86" would cut it to get rid of the bogus
warnings,
though.

Solution (1) above sounds preferable, unless there are mysterious reasons
why ia64 wants to avoid Kconfig.preempt (adding Tony Luck to Cc:).


Satyam

[1] Last time this happened was with something called ATARI_KBD_CORE.
I submitted a patch that unfortunately degenerated into a flamewar :-) The
bogus warnings remained (causing more traffic) for a month or so, before
an alternate solution got finally merged.

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

* RE: kvm warning
  2007-08-13 17:31         ` Satyam Sharma
@ 2007-08-13 17:37           ` Luck, Tony
  2007-08-13 18:11             ` Satyam Sharma
  0 siblings, 1 reply; 8+ messages in thread
From: Luck, Tony @ 2007-08-13 17:37 UTC (permalink / raw)
  To: Satyam Sharma, Avi Kivity
  Cc: Andrew Morton, Ingo Molnar, kvm-devel, linux-kernel

> Solution (1) above sounds preferable, unless there are mysterious reasons
> why ia64 wants to avoid Kconfig.preempt (adding Tony Luck to Cc:).

Send me a patch and unless it causes more problems than it solves, I'll
put it in.

-Tony

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

* RE: kvm warning
  2007-08-13 17:37           ` Luck, Tony
@ 2007-08-13 18:11             ` Satyam Sharma
  0 siblings, 0 replies; 8+ messages in thread
From: Satyam Sharma @ 2007-08-13 18:11 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Avi Kivity, Andrew Morton, Ingo Molnar, kvm-devel,
	Linux Kernel Mailing List



On Mon, 13 Aug 2007, Luck, Tony wrote:

> > Solution (1) above sounds preferable, unless there are mysterious reasons
> > why ia64 wants to avoid Kconfig.preempt (adding Tony Luck to Cc:).
> 
> Send me a patch and unless it causes more problems than it solves, I'll
> put it in.


[PATCH] ia64: Include Kconfig.preempt

arch/ia64/Kconfig failed to include kernel/Kconfig.preempt that meant it
did not support PREEMPT_VOLUNTARY and PREEMPT_BKL (inadvertently).
This was recently noticed when the newly-added PREEMPT_NOTIFIERS in
Kconfig.preempt that was "select"ed from drivers/kvm/Kconfig (therefore)
started giving bogus warnings ('select' used by config symbol 'KVM' refers
to undefined symbol 'PREEMPT_NOTIFIERS') on ia64 builds.

So let's remove the open-coded definition of CONFIG_PREEMPT in
arch/ia64/Kconfig and replace it with just including Kconfig.preempt
instead, like the other archs do.

Signed-off-by: Satyam Sharma <satyam@infradead.org>

---

 arch/ia64/Kconfig |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 21aa4fc..8c39913 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -327,17 +327,7 @@ config FORCE_CPEI_RETARGET
 	This option it useful to enable this feature on older BIOS's as well.
 	You can also enable this by using boot command line option force_cpei=1.
 
-config PREEMPT
-	bool "Preemptible Kernel"
-        help
-          This option reduces the latency of the kernel when reacting to
-          real-time or interactive events by allowing a low priority process to
-          be preempted even if it is in kernel mode executing a system call.
-          This allows applications to run more reliably even when the system is
-          under load.
-
-          Say Y here if you are building a kernel for a desktop, embedded
-          or real-time system.  Say N if you are unsure.
+source "kernel/Kconfig.preempt"
 
 source "mm/Kconfig"
 

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

end of thread, other threads:[~2007-08-13 18:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-08 22:14 kvm warning Andrew Morton
2007-08-08 22:19 ` Ingo Molnar
2007-08-08 22:48   ` Avi Kivity
2007-08-08 22:59     ` Andrew Morton
2007-08-08 23:09       ` Avi Kivity
2007-08-13 17:31         ` Satyam Sharma
2007-08-13 17:37           ` Luck, Tony
2007-08-13 18:11             ` Satyam Sharma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox