[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070921170548.GA1857@martell.zuzino.mipt.ru>
Date: Fri, 21 Sep 2007 21:05:48 +0400
From: Alexey Dobriyan <adobriyan@...il.com>
To: linux-kernel@...r.kernel.org
Cc: rientjes@...gle.com, andrea@...e.de, clameter@....com
Subject: Re: + oom-move-prototypes-to-appropriate-header-file.patch added to -mm tree
On Fri, Sep 21, 2007 at 02:10:55AM -0700, akpm@...ux-foundation.org wrote:
> Move the OOM killer's extern function prototypes to include/linux/oom.h and
> include it where necessary.
>
> Cc: Andrea Arcangeli <andrea@...e.de>
> Acked-by: Christoph Lameter <clameter@....com>
NAK. Target in corresponding Kbuild is wrong. sched.h is overkill.
Could we please also drop extern's while in protos?
> --- a/drivers/char/sysrq.c~oom-move-prototypes-to-appropriate-header-file
> +++ a/drivers/char/sysrq.c
> @@ -36,6 +36,7 @@
> #include <linux/kexec.h>
> #include <linux/irq.h>
> #include <linux/hrtimer.h>
> +#include <linux/oom.h>
>
> #include <asm/ptrace.h>
> #include <asm/irq_regs.h>
> diff -puN include/linux/oom.h~oom-move-prototypes-to-appropriate-header-file include/linux/oom.h
> --- a/include/linux/oom.h~oom-move-prototypes-to-appropriate-header-file
> +++ a/include/linux/oom.h
> @@ -1,10 +1,19 @@
> #ifndef __INCLUDE_LINUX_OOM_H
> #define __INCLUDE_LINUX_OOM_H
>
> +#include <linux/sched.h>
> +
> /* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */
> #define OOM_DISABLE (-17)
> /* inclusive */
> #define OOM_ADJUST_MIN (-16)
> #define OOM_ADJUST_MAX 15
>
> -#endif
> +#ifdef __KERNEL__
> +
> +extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order);
> +extern int register_oom_notifier(struct notifier_block *nb);
> +extern int unregister_oom_notifier(struct notifier_block *nb);
-
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