* [PATCH 6/8] x86: add MULTIUSER dependency for KVM [not found] <20170719125310.2487451-1-arnd@arndb.de> @ 2017-07-19 12:53 ` Arnd Bergmann 2017-07-19 14:11 ` Radim Krčmář 0 siblings, 1 reply; 5+ messages in thread From: Arnd Bergmann @ 2017-07-19 12:53 UTC (permalink / raw) To: x86, Paolo Bonzini, Radim Krčmář, Thomas Gleixner, Ingo Molnar, H. Peter Anvin Cc: linux-kernel, Arnd Bergmann, Alex Williamson, kvm KVM tries to select 'TASKSTATS', which had additional dependencies: warning: (KVM) selects TASKSTATS which has unmet direct dependencies (NET && MULTIUSER) Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- arch/x86/kvm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 760433b2574a..2688c7dc5323 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -22,7 +22,7 @@ config KVM depends on HAVE_KVM depends on HIGH_RES_TIMERS # for TASKSTATS/TASK_DELAY_ACCT: - depends on NET + depends on NET && MULTIUSER select PREEMPT_NOTIFIERS select MMU_NOTIFIER select ANON_INODES -- 2.9.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 6/8] x86: add MULTIUSER dependency for KVM 2017-07-19 12:53 ` [PATCH 6/8] x86: add MULTIUSER dependency for KVM Arnd Bergmann @ 2017-07-19 14:11 ` Radim Krčmář 2017-07-19 14:18 ` Arnd Bergmann 0 siblings, 1 reply; 5+ messages in thread From: Radim Krčmář @ 2017-07-19 14:11 UTC (permalink / raw) To: Arnd Bergmann Cc: x86, Paolo Bonzini, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, linux-kernel, Alex Williamson, kvm 2017-07-19 14:53+0200, Arnd Bergmann: > KVM tries to select 'TASKSTATS', which had additional dependencies: > > warning: (KVM) selects TASKSTATS which has unmet direct dependencies (NET && MULTIUSER) > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- Hm, do you know why Kconfig warns instead of propagating the dependencies? > diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig > @@ -22,7 +22,7 @@ config KVM > # for TASKSTATS/TASK_DELAY_ACCT: > - depends on NET > + depends on NET && MULTIUSER The current condition goes halfway to nowhere, so the patch is definitely an improvement, even if the result is not good ... Applied, thanks. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 6/8] x86: add MULTIUSER dependency for KVM 2017-07-19 14:11 ` Radim Krčmář @ 2017-07-19 14:18 ` Arnd Bergmann 2017-07-19 16:13 ` Radim Krčmář 0 siblings, 1 reply; 5+ messages in thread From: Arnd Bergmann @ 2017-07-19 14:18 UTC (permalink / raw) To: Radim Krčmář Cc: the arch/x86 maintainers, Paolo Bonzini, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Linux Kernel Mailing List, Alex Williamson, kvm On Wed, Jul 19, 2017 at 4:11 PM, Radim Krčmář <rkrcmar@redhat.com> wrote: > 2017-07-19 14:53+0200, Arnd Bergmann: >> KVM tries to select 'TASKSTATS', which had additional dependencies: >> >> warning: (KVM) selects TASKSTATS which has unmet direct dependencies (NET && MULTIUSER) >> >> Signed-off-by: Arnd Bergmann <arnd@arndb.de> >> --- > > Hm, do you know why Kconfig warns instead of propagating the > dependencies? Kconfig propagates 'depends on' dependencies, but cannot turn a 'select' into 'depends on', as those two mean different things. Another solution to the problem would be to use 'depends on TASKSTATS'. Generally speaking, using 'select' to turn on a user-visible option is a bad idea, but blindly turning those 'select' into 'depends on' is also dangerous, as it can break configurations of existing users that would here end up with neither TASKSTATS nor KVM after a 'make oldconfig'. Arnd ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 6/8] x86: add MULTIUSER dependency for KVM 2017-07-19 14:18 ` Arnd Bergmann @ 2017-07-19 16:13 ` Radim Krčmář 2017-07-23 13:41 ` Paolo Bonzini 0 siblings, 1 reply; 5+ messages in thread From: Radim Krčmář @ 2017-07-19 16:13 UTC (permalink / raw) To: Arnd Bergmann Cc: the arch/x86 maintainers, Paolo Bonzini, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Linux Kernel Mailing List, Alex Williamson, kvm 2017-07-19 16:18+0200, Arnd Bergmann: > On Wed, Jul 19, 2017 at 4:11 PM, Radim Krčmář <rkrcmar@redhat.com> wrote: > > 2017-07-19 14:53+0200, Arnd Bergmann: > >> KVM tries to select 'TASKSTATS', which had additional dependencies: > >> > >> warning: (KVM) selects TASKSTATS which has unmet direct dependencies (NET && MULTIUSER) > >> > >> Signed-off-by: Arnd Bergmann <arnd@arndb.de> > >> --- > > > > Hm, do you know why Kconfig warns instead of propagating the > > dependencies? > > Kconfig propagates 'depends on' dependencies, but cannot turn a 'select' > into 'depends on', as those two mean different things. > > Another solution to the problem would be to use 'depends on TASKSTATS'. Good point, 'select' seems misused here. There is no reason to depend on TASKSTATS (nor NET+MULTIUSER), we only suggest to enable it with KVM. KVM uses sched_info_on() to handle any any possible resulting configuration, c9aaa8957f20 ("KVM: Steal time implementation"). KVM would work as intended if 'select' would not enable the option if its dependencies failed (instead of unconditionally forcing the option). Is the preferred way to encode it: 'default y if KVM' in config TASK_DELAY_ACCT (that adds a non-local and enigmatic dependency and also needlessly expands the possible configuration space) or 'select TASKSTATS if NET && MULTIUSER' in config KVM (that is going to break when dependencies of TASKSTATS change again) ? thanks. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 6/8] x86: add MULTIUSER dependency for KVM 2017-07-19 16:13 ` Radim Krčmář @ 2017-07-23 13:41 ` Paolo Bonzini 0 siblings, 0 replies; 5+ messages in thread From: Paolo Bonzini @ 2017-07-23 13:41 UTC (permalink / raw) To: Radim Krčmář, Arnd Bergmann Cc: the arch/x86 maintainers, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Linux Kernel Mailing List, Alex Williamson, kvm On 19/07/2017 18:13, Radim Krčmář wrote: > Good point, 'select' seems misused here. > > There is no reason to depend on TASKSTATS (nor NET+MULTIUSER), we only > suggest to enable it with KVM. KVM uses sched_info_on() to handle any > any possible resulting configuration, c9aaa8957f20 ("KVM: Steal time > implementation"). > > KVM would work as intended if 'select' would not enable the option if > its dependencies failed (instead of unconditionally forcing the option). > > Is the preferred way to encode it: > > 'default y if KVM' in config TASK_DELAY_ACCT > (that adds a non-local and enigmatic dependency and also needlessly > expands the possible configuration space) > > or > > 'select TASKSTATS if NET && MULTIUSER' in config KVM > (that is going to break when dependencies of TASKSTATS change again) > > ? I think the former is the closest to what the user actually wants, and it would let us clean up arch/x86/kvm/Kconfig. However it should be "default y if KVM && X86'. Maybe there is room for a new operator "suggest Y" which, when added inside "config X", operates as if "config Y" had a "default y if X". In this case, kvm could do - depends on NET && MULTIUSER - select TASKSTATS + suggest TASKSTATS Thanks, Paolo ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-07-23 13:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170719125310.2487451-1-arnd@arndb.de>
2017-07-19 12:53 ` [PATCH 6/8] x86: add MULTIUSER dependency for KVM Arnd Bergmann
2017-07-19 14:11 ` Radim Krčmář
2017-07-19 14:18 ` Arnd Bergmann
2017-07-19 16:13 ` Radim Krčmář
2017-07-23 13:41 ` Paolo Bonzini
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox