mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: + oom-move-prototypes-to-appropriate-header-file.patch added to -mm tree
       [not found] <200709210910.l8L9AttS028186@imap1.linux-foundation.org>
@ 2007-09-21 17:05 ` Alexey Dobriyan
  2007-09-21 19:38   ` David Rientjes
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Dobriyan @ 2007-09-21 17:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: rientjes, andrea, clameter

On Fri, Sep 21, 2007 at 02:10:55AM -0700, akpm@linux-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@suse.de>
> Acked-by: Christoph Lameter <clameter@sgi.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);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: + oom-move-prototypes-to-appropriate-header-file.patch added to -mm tree
  2007-09-21 17:05 ` + oom-move-prototypes-to-appropriate-header-file.patch added to -mm tree Alexey Dobriyan
@ 2007-09-21 19:38   ` David Rientjes
  2007-09-21 19:54     ` Alexey Dobriyan
  0 siblings, 1 reply; 4+ messages in thread
From: David Rientjes @ 2007-09-21 19:38 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: linux-kernel, andrea, clameter

On Fri, 21 Sep 2007, Alexey Dobriyan wrote:

> > Move the OOM killer's extern function prototypes to include/linux/oom.h and
> > include it where necessary.
> > 
> > Cc: Andrea Arcangeli <andrea@suse.de>
> > Acked-by: Christoph Lameter <clameter@sgi.com>
> 
> NAK. Target in corresponding Kbuild is wrong. sched.h is overkill.
> Could we please also drop extern's while in protos?
> 

I'll prevent including sched.h in a follow-up patchset that I'll be 
posting soon (and you'll be Cc'd).  Which Kbuild target are you referring 
to?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: + oom-move-prototypes-to-appropriate-header-file.patch added to -mm tree
  2007-09-21 19:38   ` David Rientjes
@ 2007-09-21 19:54     ` Alexey Dobriyan
  2007-09-21 20:06       ` Robert P. J. Day
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Dobriyan @ 2007-09-21 19:54 UTC (permalink / raw)
  To: David Rientjes; +Cc: linux-kernel, andrea, clameter

On Fri, Sep 21, 2007 at 12:38:03PM -0700, David Rientjes wrote:
> On Fri, 21 Sep 2007, Alexey Dobriyan wrote:
> 
> > > Move the OOM killer's extern function prototypes to include/linux/oom.h and
> > > include it where necessary.
> > > 
> > > Cc: Andrea Arcangeli <andrea@suse.de>
> > > Acked-by: Christoph Lameter <clameter@sgi.com>
> > 
> > NAK. Target in corresponding Kbuild is wrong. sched.h is overkill.
> > Could we please also drop extern's while in protos?
> > 
> 
> I'll prevent including sched.h in a follow-up patchset that I'll be 
> posting soon (and you'll be Cc'd).  Which Kbuild target are you referring 
> to?

It's header-y vs unifdef-y in include/linux/Kbuild. The former is for
plain headers exported to userspace as-is. The latter need preprocessing
to remove __KERNEL__, CONFIG_*, etc.

Since you're going to clutter oom.h with some purely internal protos,
preprocessing should be done as well ;-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: + oom-move-prototypes-to-appropriate-header-file.patch added to -mm tree
  2007-09-21 19:54     ` Alexey Dobriyan
@ 2007-09-21 20:06       ` Robert P. J. Day
  0 siblings, 0 replies; 4+ messages in thread
From: Robert P. J. Day @ 2007-09-21 20:06 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: David Rientjes, linux-kernel, andrea, clameter

On Fri, 21 Sep 2007, Alexey Dobriyan wrote:

> On Fri, Sep 21, 2007 at 12:38:03PM -0700, David Rientjes wrote:
> > On Fri, 21 Sep 2007, Alexey Dobriyan wrote:
> >
> > > > Move the OOM killer's extern function prototypes to include/linux/oom.h and
> > > > include it where necessary.
> > > >
> > > > Cc: Andrea Arcangeli <andrea@suse.de>
> > > > Acked-by: Christoph Lameter <clameter@sgi.com>
> > >
> > > NAK. Target in corresponding Kbuild is wrong. sched.h is overkill.
> > > Could we please also drop extern's while in protos?
> > >
> >
> > I'll prevent including sched.h in a follow-up patchset that I'll be
> > posting soon (and you'll be Cc'd).  Which Kbuild target are you referring
> > to?
>
> It's header-y vs unifdef-y in include/linux/Kbuild. The former is
> for plain headers exported to userspace as-is. The latter need
> preprocessing to remove __KERNEL__, CONFIG_*, etc.

AFAIK, the only preprocessing that's removed is "__KERNEL__".

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-21 20:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200709210910.l8L9AttS028186@imap1.linux-foundation.org>
2007-09-21 17:05 ` + oom-move-prototypes-to-appropriate-header-file.patch added to -mm tree Alexey Dobriyan
2007-09-21 19:38   ` David Rientjes
2007-09-21 19:54     ` Alexey Dobriyan
2007-09-21 20:06       ` Robert P. J. Day

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®