[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201512080719.EHD73429.JQHFtMOFLOFSVO@I-love.SAKURA.ne.jp>
Date: Tue, 8 Dec 2015 07:19:42 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: mhocko@...nel.org
Cc: linux-mm@...ck.org, akpm@...ux-foundation.org,
torvalds@...ux-foundation.org, mgorman@...e.de,
rientjes@...gle.com, riel@...hat.com, hughd@...gle.com,
oleg@...hat.com, andrea@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH -v2] mm, oom: introduce oom reaper
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists