From: David Rientjes <rientjes@google.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Balbir Singh <balbir@linux.vnet.ibm.com>,
minchan.kim@gmail.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH v4 1/2] sysctl clean up vm related variable declarations
Date: Thu, 28 Jan 2010 00:54:49 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.00.1001280048110.15953@chino.kir.corp.google.com> (raw)
In-Reply-To: <20100127153232.f8efc531.kamezawa.hiroyu@jp.fujitsu.com>
On Wed, 27 Jan 2010, KAMEZAWA Hiroyuki wrote:
> Now, there are many "extern" declaration in kernel/sysctl.c. "extern"
> declaration in *.c file is not appreciated in general.
> And Hmm...it seems there are a few redundant declarations.
>
sysctl_overcommit_memory and sysctl_overcommit_ratio, right?
> Because most of sysctl variables are defined in its own header file,
> they should be declared in the same style, be done in its own *.h file.
>
> This patch removes some VM(memory management) related sysctl's
> variable declaration from kernel/sysctl.c and move them to
> proper places.
>
> Change log:
> - 2010/01/27 (new)
>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
This is a very nice cleanup of the sysctl code, I hope you find the time
to push it regardless of the future direction of the oom killer lowmem
constraint.
One comment below.
> ---
> include/linux/mm.h | 5 +++++
> include/linux/mmzone.h | 1 +
> include/linux/oom.h | 5 +++++
> kernel/sysctl.c | 16 ++--------------
> mm/mmap.c | 5 +++++
> 5 files changed, 18 insertions(+), 14 deletions(-)
>
> Index: mmotm-2.6.33-Jan15-2/include/linux/mm.h
> ===================================================================
> --- mmotm-2.6.33-Jan15-2.orig/include/linux/mm.h
> +++ mmotm-2.6.33-Jan15-2/include/linux/mm.h
> @@ -1432,6 +1432,7 @@ int in_gate_area_no_task(unsigned long a
> #define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);})
> #endif /* __HAVE_ARCH_GATE_AREA */
>
> +extern int sysctl_drop_caches;
> int drop_caches_sysctl_handler(struct ctl_table *, int,
> void __user *, size_t *, loff_t *);
> unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
> @@ -1476,5 +1477,9 @@ extern int soft_offline_page(struct page
>
> extern void dump_page(struct page *page);
>
> +#ifndef CONFIG_NOMMU
> +extern int sysctl_nr_trim_pages;
This should be #ifndef CONFIG_MMU.
> +#endif
> +
> #endif /* __KERNEL__ */
> #endif /* _LINUX_MM_H */
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-01-28 8:55 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-21 5:59 [PATCH] oom-kill: add lowmem usage aware oom kill handling KAMEZAWA Hiroyuki
2010-01-21 15:18 ` Minchan Kim
2010-01-21 23:48 ` KAMEZAWA Hiroyuki
2010-01-22 0:40 ` Minchan Kim
2010-01-22 1:06 ` KAMEZAWA Hiroyuki
2010-01-21 15:29 ` Balbir Singh
2010-01-21 23:54 ` KAMEZAWA Hiroyuki
2010-01-22 6:23 ` [PATCH v2] " KAMEZAWA Hiroyuki
2010-01-22 14:00 ` Minchan Kim
2010-01-22 15:16 ` KAMEZAWA Hiroyuki
2010-01-22 15:41 ` Minchan Kim
2010-01-25 6:15 ` [PATCH v3] " KAMEZAWA Hiroyuki
2010-01-26 23:12 ` Andrew Morton
2010-01-26 23:53 ` KAMEZAWA Hiroyuki
2010-01-27 0:19 ` Andrew Morton
2010-01-27 0:58 ` KAMEZAWA Hiroyuki
2010-01-27 6:30 ` [PATCH v4 0/2] " KAMEZAWA Hiroyuki
2010-01-27 6:32 ` [PATCH v4 1/2] sysctl clean up vm related variable declarations KAMEZAWA Hiroyuki
2010-01-28 8:54 ` David Rientjes [this message]
2010-01-28 10:30 ` KAMEZAWA Hiroyuki
2010-01-27 6:33 ` [PATCH v4 2/2] oom-kill: add lowmem usage aware oom kill handling v4 KAMEZAWA Hiroyuki
2010-01-28 0:12 ` [PATCH v4 0/2] oom-kill: add lowmem usage aware oom kill handling KAMEZAWA Hiroyuki
2010-01-27 23:56 ` [PATCH v3] " David Rientjes
2010-01-28 0:16 ` Alan Cox
2010-01-28 0:26 ` KAMEZAWA Hiroyuki
2010-01-28 0:59 ` David Rientjes
2010-01-29 0:25 ` Vedran Furač
2010-01-29 0:35 ` Alan Cox
2010-01-29 0:57 ` Vedran Furač
2010-01-29 11:03 ` Alan Cox
2010-01-30 12:33 ` Vedran Furač
2010-01-30 12:59 ` Alan Cox
2010-01-30 17:30 ` Vedran Furač
2010-01-30 17:45 ` Alan Cox
2010-01-30 18:17 ` Vedran Furač
2010-01-27 23:46 ` David Rientjes
2010-01-26 23:16 ` Andrew Morton
2010-01-26 23:44 ` KAMEZAWA Hiroyuki
2010-01-27 23:40 ` David Rientjes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.00.1001280048110.15953@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan.kim@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox