Re: [PATCH 1/6] proc, oom: drop bogus task_lock and mm check

2016-06-01 Thread Michal Hocko
On Wed 01-06-16 19:41:09, Tetsuo Handa wrote: > Michal Hocko wrote: > > On Wed 01-06-16 00:53:03, Oleg Nesterov wrote: > > > On 05/31, Michal Hocko wrote: > > > > > > > > Oleg has pointed out that can simplify both oom_adj_write and > > > > oom_score_adj_write even further and drop the sighand lock

Re: [PATCH 1/6] proc, oom: drop bogus task_lock and mm check

2016-06-01 Thread Tetsuo Handa
Michal Hocko wrote: > On Wed 01-06-16 00:53:03, Oleg Nesterov wrote: > > On 05/31, Michal Hocko wrote: > > > > > > Oleg has pointed out that can simplify both oom_adj_write and > > > oom_score_adj_write even further and drop the sighand lock. The only > > > purpose of the lock was to protect p->sig

Re: [PATCH 1/6] proc, oom: drop bogus task_lock and mm check

2016-05-31 Thread Michal Hocko
On Wed 01-06-16 00:53:03, Oleg Nesterov wrote: > On 05/31, Michal Hocko wrote: > > > > Oleg has pointed out that can simplify both oom_adj_write and > > oom_score_adj_write even further and drop the sighand lock. The only > > purpose of the lock was to protect p->signal from going away but this > >

Re: [PATCH 1/6] proc, oom: drop bogus task_lock and mm check

2016-05-31 Thread Oleg Nesterov
On 05/31, Michal Hocko wrote: > > Oleg has pointed out that can simplify both oom_adj_write and > oom_score_adj_write even further and drop the sighand lock. The only > purpose of the lock was to protect p->signal from going away but this > will not happen since ea6d290ca34c ("signals: make task_st

Re: [PATCH 1/6] proc, oom: drop bogus task_lock and mm check

2016-05-31 Thread Michal Hocko
On Mon 30-05-16 19:43:24, Oleg Nesterov wrote: > On 05/30, Michal Hocko wrote: > > > > both oom_adj_write and oom_score_adj_write are using task_lock, > > check for task->mm and fail if it is NULL. This is not needed because > > the oom_score_adj is per signal struct so we do not need mm at all. >

Re: [PATCH 1/6] proc, oom: drop bogus task_lock and mm check

2016-05-30 Thread Oleg Nesterov
On 05/30, Michal Hocko wrote: > > both oom_adj_write and oom_score_adj_write are using task_lock, > check for task->mm and fail if it is NULL. This is not needed because > the oom_score_adj is per signal struct so we do not need mm at all. > The code has been introduced by 3d5992d2ac7d ("oom: add p

Re: [PATCH 1/6] proc, oom: drop bogus task_lock and mm check

2016-05-30 Thread Vladimir Davydov
On Mon, May 30, 2016 at 03:05:51PM +0200, Michal Hocko wrote: > From: Michal Hocko > > both oom_adj_write and oom_score_adj_write are using task_lock, > check for task->mm and fail if it is NULL. This is not needed because > the oom_score_adj is per signal struct so we do not need mm at all. > Th

[PATCH 1/6] proc, oom: drop bogus task_lock and mm check

2016-05-30 Thread Michal Hocko
From: Michal Hocko both oom_adj_write and oom_score_adj_write are using task_lock, check for task->mm and fail if it is NULL. This is not needed because the oom_score_adj is per signal struct so we do not need mm at all. The code has been introduced by 3d5992d2ac7d ("oom: add per-mm oom disable c