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


Groups > linux.kernel > #1580649

Re: [PATCH] oom_reaper: switch to struct list_head for reap queue

From Johannes Weiner <hannes@cmpxchg.org>
Newsgroups linux.kernel
Subject Re: [PATCH] oom_reaper: switch to struct list_head for reap queue
Date 2017-02-14 17:40 +0100
Message-ID <taOj0-4aW-3@gated-at.bofh.it> (permalink)
References <taMTU-3rm-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Feb 15, 2017 at 02:07:14AM +1100, Aleksa Sarai wrote:
> Rather than implementing an open addressing linked list structure
> ourselves, use the standard list_head structure to improve consistency
> with the rest of the kernel and reduce confusion.
> 
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Oleg Nesterov <oleg@redhat.com>
> Signed-off-by: Aleksa Sarai <asarai@suse.de>
> ---
>  include/linux/sched.h |  6 +++++-
>  kernel/fork.c         |  4 ++++
>  mm/oom_kill.c         | 24 +++++++++++++-----------
>  3 files changed, 22 insertions(+), 12 deletions(-)
> 
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index e93594b88130..d8bcd0f8c5fe 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -1960,7 +1960,11 @@ struct task_struct {
>  #endif
>  	int pagefault_disabled;
>  #ifdef CONFIG_MMU
> -	struct task_struct *oom_reaper_list;
> +	/*
> +	 * List of threads that have to be reaped by OOM (rooted at
> +	 * &oom_reaper_list in mm/oom_kill.c).
> +	 */
> +	struct list_head oom_reaper_list;

This is an extra pointer to task_struct and more lines of code to
accomplish the same thing. Why would we want to do that?

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


Thread

[PATCH] oom_reaper: switch to struct list_head for reap queue Aleksa Sarai <asarai@suse.de> - 2017-02-14 16:10 +0100
  Re: [PATCH] oom_reaper: switch to struct list_head for reap queue Johannes Weiner <hannes@cmpxchg.org> - 2017-02-14 17:40 +0100
    Re: [PATCH] oom_reaper: switch to struct list_head for reap queue Aleksa Sarai <asarai@suse.de> - 2017-02-14 18:00 +0100
      Re: [PATCH] oom_reaper: switch to struct list_head for reap queue Oleg Nesterov <oleg@redhat.com> - 2017-02-14 18:40 +0100
        Re: [PATCH] oom_reaper: switch to struct list_head for reap queue Aleksa Sarai <asarai@suse.de> - 2017-02-15 10:10 +0100
          Re: [PATCH] oom_reaper: switch to struct list_head for reap queue Michal Hocko <mhocko@kernel.org> - 2017-02-20 17:00 +0100
      Re: [PATCH] oom_reaper: switch to struct list_head for reap queue Ingo Molnar <mingo@kernel.org> - 2017-02-15 09:10 +0100

csiph-web