linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
To: Michal Hocko <mhocko@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Roman Gushchin <guro@fb.com>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Tejun Heo <tj@kernel.org>, linux-mm <linux-mm@kvack.org>
Subject: Re: [RFC] Getting rid of INFLIGHT_VICTIM
Date: Tue, 5 Jun 2018 23:10:20 +0900	[thread overview]
Message-ID: <8da59f92-8de5-99e9-c62e-c972e2a66ac4@i-love.sakura.ne.jp> (raw)
In-Reply-To: <10e40484-66e2-d879-e9b7-f50fdc5846ac@i-love.sakura.ne.jp>

On 2018/06/05 22:31, Tetsuo Handa wrote:
> @@ -639,15 +618,18 @@ static int oom_reaper(void *unused)
>  
>  static void wake_oom_reaper(struct task_struct *tsk)
>  {
> -	/* tsk is already queued? */
> -	if (tsk == oom_reaper_list || tsk->oom_reaper_list)
> -		return;
> -
> -	get_task_struct(tsk);
> +	struct task_struct *p = oom_reaper_th;
>  
>  	spin_lock(&oom_reaper_lock);
> -	tsk->oom_reaper_list = oom_reaper_list;
> -	oom_reaper_list = tsk;
> +	while (p != tsk && p->oom_reaper_list)
> +		p = p->oom_reaper_list;
> +	if (p != tsk) {

Oops. This is "if (p == tsk) {".

> +		spin_unlock(&oom_reaper_lock);
> +		return;
> +	}
> +	p->oom_reaper_list = tsk;
> +	tsk->oom_reaper_list = NULL;
> +	get_task_struct(tsk);
>  	spin_unlock(&oom_reaper_lock);
>  	trace_wake_reaper(tsk->pid);
>  	wake_up(&oom_reaper_wait);

      reply	other threads:[~2018-06-05 14:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05 13:31 Tetsuo Handa
2018-06-05 14:10 ` Tetsuo Handa [this message]

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=8da59f92-8de5-99e9-c62e-c972e2a66ac4@i-love.sakura.ne.jp \
    --to=penguin-kernel@i-love.sakura.ne.jp \
    --cc=akpm@linux-foundation.org \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=rientjes@google.com \
    --cc=tj@kernel.org \
    --cc=vdavydov.dev@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