linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: mhocko@kernel.org
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
	torvalds@linux-foundation.org, mgorman@suse.de,
	rientjes@google.com, riel@redhat.com, hughd@google.com,
	oleg@redhat.com, andrea@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH -v2] mm, oom: introduce oom reaper
Date: Tue, 8 Dec 2015 07:19:42 +0900	[thread overview]
Message-ID: <201512080719.EHD73429.JQHFtMOFLOFSVO@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <20151207160718.GA20774@dhcp22.suse.cz>

Michal Hocko wrote:
> Yes you are right! The reference count should be incremented before
> publishing the new mm_to_reap. I thought that an elevated ref. count by
> the caller would be enough but this was clearly wrong. Does the update
> below looks better?

I think that moving mmdrop() from oom_kill_process() to
oom_reap_vmas() xor wake_oom_reaper() makes the patch simpler.

 	rcu_read_unlock();
 
+	if (can_oom_reap)
+		wake_oom_reaper(mm); /* will call mmdrop() */
+	else
+		mmdrop(mm);
-	mmdrop(mm);
 	put_task_struct(victim);
 }

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-12-07 22:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25 15:56 [RFC PATCH] " Michal Hocko
2015-11-25 20:08 ` Johannes Weiner
2015-11-26 11:08   ` Michal Hocko
2015-11-26 15:24     ` Tetsuo Handa
2015-11-26 16:34       ` Michal Hocko
2015-11-26 17:31         ` Michal Hocko
2015-11-27 11:29         ` Tetsuo Handa
2015-11-27 12:35           ` Michal Hocko
2015-11-27 16:12 ` [RFC PATCH -v2] " Michal Hocko
2015-11-27 16:39   ` Mel Gorman
2015-12-01 13:07     ` Michal Hocko
2015-11-28  4:39   ` Tetsuo Handa
2015-11-28 16:10     ` Tetsuo Handa
2015-12-01 13:29       ` Michal Hocko
2015-12-05 12:33         ` Tetsuo Handa
2015-12-07 16:07           ` Michal Hocko
2015-12-07 22:19             ` Tetsuo Handa [this message]
2015-12-08 11:06               ` Michal Hocko
2015-12-01 13:22     ` Michal Hocko

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=201512080719.EHD73429.JQHFtMOFLOFSVO@I-love.SAKURA.ne.jp \
    --to=penguin-kernel@i-love.sakura.ne.jp \
    --cc=akpm@linux-foundation.org \
    --cc=andrea@kernel.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@kernel.org \
    --cc=oleg@redhat.com \
    --cc=riel@redhat.com \
    --cc=rientjes@google.com \
    --cc=torvalds@linux-foundation.org \
    /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