On 02/09/2016 01:00 PM, Christian Borntraeger wrote: > Right now halt_poll_ns can be change during runtime. The > grow and shrink factors can only be set during module load. > Let's make this consistent and allow changes during runtime. > To avoid dirty tricky like setting shrink to 0 after the > check for 0, use READ_ONCE to get a consistent number for > all cases. > > Cc: Wanpeng Li <wanpeng.li@xxxxxxxxxxx> > Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx> > --- > virt/kvm/kvm_main.c | 22 ++++++++++++---------- > 1 file changed, 12 insertions(+), 10 deletions(-) > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index 726d7c8..eafea6f 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -72,11 +72,11 @@ module_param(halt_poll_ns, uint, S_IRUGO | S_IWUSR); > > /* Default doubles per-vcpu halt_poll_ns. */ > static unsigned int halt_poll_ns_grow = 2; > -module_param(halt_poll_ns_grow, int, S_IRUGO); > +module_param(halt_poll_ns_grow, int, S_IRUGO | S_IWUSR); Please let me know if I should respin with a global fixup regarding signedness: Right now we have a mix of uint: > static unsigned int halt_poll_ns_grow = 2; int: > +module_param(halt_poll_ns_grow, int, S_IRUGO | S_IWUSR); int: > - int old, val; I think having everything as unsigned int would be the right thing. Christian -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html