Re: [patch 2/2] mm, oom: fix race when specifying a thread as the oom origin

2012-11-12 Thread David Rientjes
On Mon, 12 Nov 2012, Thiago Farina wrote: > > I didn't like the previous playing with the oom_score_adj and what you > > propose looks much nicer. > > Maybe s/oom_task_origin/task_oom_origin/ would be a better fit > May be s/oom_task_origin/is_task_origin_oom? Just my 2 cents. > I like to

Re: [patch 2/2] mm, oom: fix race when specifying a thread as the oom origin

2012-11-12 Thread Thiago Farina
On Thu, Nov 8, 2012 at 1:51 PM, Michal Hocko wrote: > On Thu 08-11-12 01:27:00, David Rientjes wrote: >> test_set_oom_score_adj() and compare_swap_oom_score_adj() are used to >> specify that current should be killed first if an oom condition occurs in >> between the two calls. >> >> The usage is

Re: [patch 2/2] mm, oom: fix race when specifying a thread as the oom origin

2012-11-12 Thread Thiago Farina
On Thu, Nov 8, 2012 at 1:51 PM, Michal Hocko mho...@suse.cz wrote: On Thu 08-11-12 01:27:00, David Rientjes wrote: test_set_oom_score_adj() and compare_swap_oom_score_adj() are used to specify that current should be killed first if an oom condition occurs in between the two calls. The usage

Re: [patch 2/2] mm, oom: fix race when specifying a thread as the oom origin

2012-11-12 Thread David Rientjes
On Mon, 12 Nov 2012, Thiago Farina wrote: I didn't like the previous playing with the oom_score_adj and what you propose looks much nicer. Maybe s/oom_task_origin/task_oom_origin/ would be a better fit May be s/oom_task_origin/is_task_origin_oom? Just my 2 cents. I like to prefix oom

Re: [patch 2/2] mm, oom: fix race when specifying a thread as the oom origin

2012-11-08 Thread Michal Hocko
On Thu 08-11-12 01:27:00, David Rientjes wrote: > test_set_oom_score_adj() and compare_swap_oom_score_adj() are used to > specify that current should be killed first if an oom condition occurs in > between the two calls. > > The usage is > > short oom_score_adj =

[patch 2/2] mm, oom: fix race when specifying a thread as the oom origin

2012-11-08 Thread David Rientjes
test_set_oom_score_adj() and compare_swap_oom_score_adj() are used to specify that current should be killed first if an oom condition occurs in between the two calls. The usage is short oom_score_adj = test_set_oom_score_adj(OOM_SCORE_ADJ_MAX); ...

[patch 2/2] mm, oom: fix race when specifying a thread as the oom origin

2012-11-08 Thread David Rientjes
test_set_oom_score_adj() and compare_swap_oom_score_adj() are used to specify that current should be killed first if an oom condition occurs in between the two calls. The usage is short oom_score_adj = test_set_oom_score_adj(OOM_SCORE_ADJ_MAX); ...

Re: [patch 2/2] mm, oom: fix race when specifying a thread as the oom origin

2012-11-08 Thread Michal Hocko
On Thu 08-11-12 01:27:00, David Rientjes wrote: test_set_oom_score_adj() and compare_swap_oom_score_adj() are used to specify that current should be killed first if an oom condition occurs in between the two calls. The usage is short oom_score_adj =