Re: [PATCH 6/8] x86: add MULTIUSER dependency for KVM

From: Paolo Bonzini
Date: Sun Jul 23 2017 - 09:42:25 EST


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