Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1296196

Re: [PATCH 1/2] mm, oom: introduce oom reaper

From Paul Gortmaker <paul.gortmaker@windriver.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] mm, oom: introduce oom reaper
Date 2015-12-21 21:40 +0100
Message-ID <qIfpn-2P6-3@gated-at.bofh.it> (permalink)
References <qG2FY-7U3-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Dec 15, 2015 at 1:36 PM, Michal Hocko <mhocko@kernel.org> wrote:
> From: Michal Hocko <mhocko@suse.com>
>
> This is based on the idea from Mel Gorman discussed during LSFMM 2015 and
> independently brought up by Oleg Nesterov.
>

[...]

Since this is built-in always, can we....

> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> index 5314b206caa5..48025a21f8c4 100644
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -35,6 +35,11 @@
>  #include <linux/freezer.h>
>  #include <linux/ftrace.h>
>  #include <linux/ratelimit.h>
> +#include <linux/kthread.h>
> +#include <linux/module.h>

...use <linux/init.h> instead above, and then...

> +
> +#include <asm/tlb.h>
> +#include "internal.h"
>

[...]

> +                * Make sure our oom reaper thread will get scheduled when
> +                * ASAP and that it won't get preempted by malicious userspace.
> +                */
> +               sched_setscheduler(oom_reaper_th, SCHED_FIFO, &param);
> +       }
> +       return 0;
> +}
> +module_init(oom_init)

...use one of the non-modular initcalls here?   I'm trying to clean up most of
the non-modular uses of modular macros etc. since:

 (1) it is easy to accidentally code up an unused module_exit function
 (2) it can be misleading when reading the source, thinking it can be
      modular when the Makefile and/or Kconfig prohibit it
 (3) it requires the include of the module.h header file which in turn
     includes nearly everything else, thus increasing CPP overhead.

I figured no point in sending a follow on patch since this came in via
the akpm tree into next and that gets rebased/updated regularly.

Thanks,
Paul.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-12-15 19:40 +0100
  Re: [PATCH 1/2] mm, oom: introduce oom reaper Andrew Morton <akpm@linux-foundation.org> - 2015-12-17 02:00 +0100
    Re: [PATCH 1/2] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-12-17 14:10 +0100
      Re: [PATCH 1/2] mm, oom: introduce oom reaper Linus Torvalds <torvalds@linux-foundation.org> - 2015-12-17 21:00 +0100
        Re: [PATCH 1/2] mm, oom: introduce oom reaper Andrew Morton <akpm@linux-foundation.org> - 2015-12-17 21:10 +0100
          Re: [PATCH 1/2] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-12-18 13:00 +0100
            Re: [PATCH 1/2] mm, oom: introduce oom reaper Andrew Morton <akpm@linux-foundation.org> - 2015-12-18 22:20 +0100
              Re: [PATCH 1/2] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-12-21 09:40 +0100
      Re: [PATCH 1/2] mm, oom: introduce oom reaper Andrew Morton <akpm@linux-foundation.org> - 2015-12-17 22:20 +0100
        Re: [PATCH 1/2] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-12-18 13:20 +0100
      Re: [PATCH 1/2] mm, oom: introduce oom reaper Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2015-12-18 13:20 +0100
        Re: [PATCH 1/2] mm, oom: introduce oom reaper Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2015-12-20 08:20 +0100
  Re: [PATCH 1/2] mm, oom: introduce oom reaper Andrew Morton <akpm@linux-foundation.org> - 2015-12-18 01:20 +0100
    Re: [PATCH 1/2] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-12-18 12:50 +0100
  Re: [PATCH 1/2] mm, oom: introduce oom reaper Paul Gortmaker <paul.gortmaker@windriver.com> - 2015-12-21 21:40 +0100
  Re: [PATCH 1/2] mm, oom: introduce oom reaper Ross Zwisler <zwisler@gmail.com> - 2015-12-24 00:10 +0100
    Re: [PATCH 1/2] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-12-24 10:50 +0100
      Re: [PATCH 1/2] mm, oom: introduce oom reaper Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2015-12-24 12:10 +0100
        Re: [PATCH 1/2] mm, oom: introduce oom reaper Ross Zwisler <zwisler@gmail.com> - 2015-12-24 22:00 +0100
        Re: [PATCH 1/2] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-12-25 12:50 +0100
      Re: [PATCH 1/2] mm, oom: introduce oom reaper Ross Zwisler <zwisler@gmail.com> - 2015-12-24 21:50 +0100
        Re: [PATCH 1/2] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-12-25 12:40 +0100
          Re: [PATCH 1/2] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-12-25 12:50 +0100

csiph-web