[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <2C763027-307F-4BC0-8C0A-7E3D5957A4DA@linuxhacker.ru>
Date: Tue, 3 Jun 2014 00:17:23 -0400
From: Oleg Drokin <green@...uxhacker.ru>
To: David Rientjes <rientjes@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org,
Rohit Seth <rohitseth@...gle.com>
Subject: Re: [PATCH] sysctl: Fix division by zero in percpu_pagelist_fraction handler
Hello!
On Jun 2, 2014, at 11:57 PM, David Rientjes wrote:
> I'm pretty sure we want to allow users to restore the kernel default
> behavior if they've already written to this file and now want to change it
> back.
>
> What do you think about doing it like this instead?
> ---
> Documentation/sysctl/vm.txt | 3 ++-
> kernel/sysctl.c | 3 +--
> mm/page_alloc.c | 20 ++++++++++++--------
> 3 files changed, 15 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
> --- a/Documentation/sysctl/vm.txt
> +++ b/Documentation/sysctl/vm.txt
> @@ -702,7 +702,8 @@ The batch value of each per cpu pagelist is also updated as a result. It is
> set to pcp->high/4. The upper limit of batch is (PAGE_SHIFT * 8)
>
> The initial value is zero. Kernel does not use this value at boot time to set
> -the high water marks for each per cpu page list.
> +the high water marks for each per cpu page list. If the user writes '0' to this
> +sysctl, it will revert to this default behavior.
I think this is probably a better idea indeed.
Always good to let users return back to defaults too.
Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists