Re: [PATCH] intel_pstate: track and export frequency residency stats via sysfs.

2014-09-10 Thread Sameer Nanda
On Wed, Sep 10, 2014 at 5:04 PM, Rafael J. Wysocki wrote: > On Wednesday, September 10, 2014 04:39:05 PM Anup Chenthamarakshan wrote: >> On Thu, Sep 11, 2014 at 12:49:48AM +0200, Rafael J. Wysocki wrote: >> > On Wednesday, September 10, 2014 03:15:08 PM Anup Chenthamarakshan wrote: >> > > >> > >

Re: [PATCH] intel_pstate: track and export frequency residency stats via sysfs.

2014-09-10 Thread Sameer Nanda
On Wed, Sep 10, 2014 at 5:04 PM, Rafael J. Wysocki r...@rjwysocki.net wrote: On Wednesday, September 10, 2014 04:39:05 PM Anup Chenthamarakshan wrote: On Thu, Sep 11, 2014 at 12:49:48AM +0200, Rafael J. Wysocki wrote: On Wednesday, September 10, 2014 03:15:08 PM Anup Chenthamarakshan wrote:

Re: [PATCH] Fix race between oom kill and task exit

2013-12-06 Thread Sameer Nanda
On Fri, Dec 6, 2013 at 7:19 AM, Oleg Nesterov wrote: > On 12/05, David Rientjes wrote: >> >> On Thu, 5 Dec 2013, Oleg Nesterov wrote: >> >> > > Your v2 series looks good and I suspect anybody trying them doesn't have >> > > additional reports of the infinite loop? Should they be marked for >> >

Re: [PATCH] Fix race between oom kill and task exit

2013-12-06 Thread Sameer Nanda
On Fri, Dec 6, 2013 at 7:19 AM, Oleg Nesterov o...@redhat.com wrote: On 12/05, David Rientjes wrote: On Thu, 5 Dec 2013, Oleg Nesterov wrote: Your v2 series looks good and I suspect anybody trying them doesn't have additional reports of the infinite loop? Should they be marked for

Re: [PATCH 1/2] introduce for_each_thread() to replace the buggy while_each_thread()

2013-12-03 Thread Sameer Nanda
; > So this patch adds the new interface which has to coexist with the > old one for some time, hopefully the next changes will be more or > less straightforward and the old one will go away soon. > > Signed-off-by: Oleg Nesterov Reviewed-by: Sameer Nanda > --- > incl

Re: [PATCH 2/2] oom_kill: change oom_kill.c to use for_each_thread()

2013-12-03 Thread Sameer Nanda
ts_mems_allowed() >without even rcu_read_lock(), this is obviously buggy. > >Add the necessary rcu_read_lock(). This means that we can not >simply return from the loop, we need "bool ret" and "break". > > Signed-off-by: Oleg

Re: [PATCH 2/2] oom_kill: change oom_kill.c to use for_each_thread()

2013-12-03 Thread Sameer Nanda
() without even rcu_read_lock(), this is obviously buggy. Add the necessary rcu_read_lock(). This means that we can not simply return from the loop, we need bool ret and break. Signed-off-by: Oleg Nesterov o...@redhat.com Reviewed-by: Sameer Nanda sna...@chromium.org --- mm/oom_kill.c | 37

Re: [PATCH 1/2] introduce for_each_thread() to replace the buggy while_each_thread()

2013-12-03 Thread Sameer Nanda
or less straightforward and the old one will go away soon. Signed-off-by: Oleg Nesterov o...@redhat.com Reviewed-by: Sameer Nanda sna...@chromium.org --- include/linux/init_task.h |2 ++ include/linux/sched.h | 12 kernel/exit.c |1 + kernel/fork.c

Re: [PATCH 3/3] signals: change do_signal_stop/do_sigaction to use while_each_thread()

2013-11-22 Thread Sameer Nanda
On Fri, Nov 22, 2013 at 11:18 AM, Oleg Nesterov wrote: > Change do_signal_stop() and do_sigaction() to avoid next_thread() > and use while_each_thread() instead. > > Signed-off-by: Oleg Nesterov Reviewed-by: Sameer Nanda > --- > kernel/signal.c |7 +++ > 1 files

Re: [PATCH 2/3] k_getrusage() can use while_each_thread()

2013-11-22 Thread Sameer Nanda
On Fri, Nov 22, 2013 at 11:18 AM, Oleg Nesterov wrote: > Change k_getrusage() to use while_each_thread(), no changes in > the compiled code. > > Signed-off-by: Oleg Nesterov Reviewed-by: Sameer Nanda > --- > kernel/sys.c |3 +-- > 1 files changed, 1 insertions(+), 2

Re: [PATCH 1/3] proc: change do_task_stat() to use while_each_thread()

2013-11-22 Thread Sameer Nanda
On Fri, Nov 22, 2013 at 11:18 AM, Oleg Nesterov wrote: > do_task_stat() can use while_each_thread(), no changes in > the compiled code. > > Signed-off-by: Oleg Nesterov Reviewed-by: Sameer Nanda > --- > fs/proc/array.c |3 +-- > 1 files changed, 1 insertions(+), 2

Re: [PATCH 2/3] k_getrusage() can use while_each_thread()

2013-11-22 Thread Sameer Nanda
On Fri, Nov 22, 2013 at 11:18 AM, Oleg Nesterov o...@redhat.com wrote: Change k_getrusage() to use while_each_thread(), no changes in the compiled code. Signed-off-by: Oleg Nesterov o...@redhat.com Reviewed-by: Sameer Nanda sna...@chromium.org --- kernel/sys.c |3 +-- 1 files changed

Re: [PATCH 1/3] proc: change do_task_stat() to use while_each_thread()

2013-11-22 Thread Sameer Nanda
On Fri, Nov 22, 2013 at 11:18 AM, Oleg Nesterov o...@redhat.com wrote: do_task_stat() can use while_each_thread(), no changes in the compiled code. Signed-off-by: Oleg Nesterov o...@redhat.com Reviewed-by: Sameer Nanda sna...@chromium.org --- fs/proc/array.c |3 +-- 1 files changed, 1

Re: [PATCH 3/3] signals: change do_signal_stop/do_sigaction to use while_each_thread()

2013-11-22 Thread Sameer Nanda
On Fri, Nov 22, 2013 at 11:18 AM, Oleg Nesterov o...@redhat.com wrote: Change do_signal_stop() and do_sigaction() to avoid next_thread() and use while_each_thread() instead. Signed-off-by: Oleg Nesterov o...@redhat.com Reviewed-by: Sameer Nanda sna...@chromium.org --- kernel/signal.c

Re: [PATCH v6] mm, oom: Fix race when selecting process to kill

2013-11-14 Thread Sameer Nanda
; Oh.. and by the way. I was hitting the same bug in other > while_each_thread loops in oom_kill.c. > Anyway, goodluck ;) Thanks! > > 14 нояб. 2013 г. 2:18 пользователь "Sameer Nanda" > написал: > >> The selection of the process to be killed happens in two spots: &g

Re: [PATCH v6] mm, oom: Fix race when selecting process to kill

2013-11-14 Thread Sameer Nanda
.. and by the way. I was hitting the same bug in other while_each_thread loops in oom_kill.c. Anyway, goodluck ;) Thanks! 14 нояб. 2013 г. 2:18 пользователь Sameer Nanda sna...@chromium.org написал: The selection of the process to be killed happens in two spots: first in select_bad_process

[PATCH v6] mm, oom: Fix race when selecting process to kill

2013-11-13 Thread Sameer Nanda
for the selected process with tasklist_lock held in oom_kill_process. Signed-off-by: Sameer Nanda --- include/linux/sched.h | 5 + mm/oom_kill.c | 34 +- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/include/linux/sched.h b/include/linux

Re: [PATCH v5] mm, oom: Fix race when selecting process to kill

2013-11-13 Thread Sameer Nanda
On Tue, Nov 12, 2013 at 6:33 PM, David Rientjes wrote: > On Tue, 12 Nov 2013, Sameer Nanda wrote: > >> The selection of the process to be killed happens in two spots: >> first in select_bad_process and then a further refinement by >> looking for child processes in

Re: [PATCH v5] mm, oom: Fix race when selecting process to kill

2013-11-13 Thread Sameer Nanda
On Tue, Nov 12, 2013 at 6:33 PM, David Rientjes rient...@google.com wrote: On Tue, 12 Nov 2013, Sameer Nanda wrote: The selection of the process to be killed happens in two spots: first in select_bad_process and then a further refinement by looking for child processes in oom_kill_process

[PATCH v6] mm, oom: Fix race when selecting process to kill

2013-11-13 Thread Sameer Nanda
for the selected process with tasklist_lock held in oom_kill_process. Signed-off-by: Sameer Nanda sna...@chromium.org --- include/linux/sched.h | 5 + mm/oom_kill.c | 34 +- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/include/linux/sched.h

[PATCH v5] mm, oom: Fix race when selecting process to kill

2013-11-12 Thread Sameer Nanda
for the selected process with tasklist_lock held in oom_kill_process. Change-Id: I62f9652a780863467a8174e18ea5e19bbcd78c31 Signed-off-by: Sameer Nanda --- mm/oom_kill.c | 42 +- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/mm/oom_kill.c b/mm

Re: [PATCH v4] mm, oom: Fix race when selecting process to kill

2013-11-12 Thread Sameer Nanda
On Tue, Nov 12, 2013 at 12:01 PM, Oleg Nesterov wrote: > On 11/11, Sameer Nanda wrote: >> >> The selection of the process to be killed happens in two spots: >> first in select_bad_process and then a further refinement by >> looking for child processes in oom_kill_proc

Re: [PATCH v4] mm, oom: Fix race when selecting process to kill

2013-11-12 Thread Sameer Nanda
On Tue, Nov 12, 2013 at 12:01 PM, Oleg Nesterov o...@redhat.com wrote: On 11/11, Sameer Nanda wrote: The selection of the process to be killed happens in two spots: first in select_bad_process and then a further refinement by looking for child processes in oom_kill_process. Since

[PATCH v5] mm, oom: Fix race when selecting process to kill

2013-11-12 Thread Sameer Nanda
for the selected process with tasklist_lock held in oom_kill_process. Change-Id: I62f9652a780863467a8174e18ea5e19bbcd78c31 Signed-off-by: Sameer Nanda sna...@chromium.org --- mm/oom_kill.c | 42 +- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/mm

[PATCH v4] mm, oom: Fix race when selecting process to kill

2013-11-11 Thread Sameer Nanda
for the selected process with tasklist_lock held in oom_kill_process. Signed-off-by: Sameer Nanda --- mm/oom_kill.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 6738c47..57638ef 100644 --- a/mm/oom_kill.c +++ b/mm

[PATCH v4] mm, oom: Fix race when selecting process to kill

2013-11-11 Thread Sameer Nanda
for the selected process with tasklist_lock held in oom_kill_process. Signed-off-by: Sameer Nanda sna...@chromium.org --- mm/oom_kill.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 6738c47..57638ef 100644 --- a/mm

[PATCH v3] mm, oom: Fix race when selecting process to kill

2013-11-08 Thread Sameer Nanda
for the selected process with tasklist_lock held in oom_kill_process. Signed-off-by: Sameer Nanda --- mm/oom_kill.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 6738c47..7b28d9f 100644 --- a/mm/oom_kill.c +++ b/mm

[PATCH v2] mm, oom: Fix race when selecting process to kill

2013-11-08 Thread Sameer Nanda
for the selected process with tasklist_lock held in oom_kill_process. Change-Id: I865c64486ccfc0e4818e7045a8fa3353e2fb63f8 Signed-off-by: Sameer Nanda --- mm/oom_kill.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 6738c47..af99b1a 100644

[PATCH v2] mm, oom: Fix race when selecting process to kill

2013-11-08 Thread Sameer Nanda
for the selected process with tasklist_lock held in oom_kill_process. Change-Id: I865c64486ccfc0e4818e7045a8fa3353e2fb63f8 Signed-off-by: Sameer Nanda sna...@chromium.org --- mm/oom_kill.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index

[PATCH v3] mm, oom: Fix race when selecting process to kill

2013-11-08 Thread Sameer Nanda
for the selected process with tasklist_lock held in oom_kill_process. Signed-off-by: Sameer Nanda sna...@chromium.org --- mm/oom_kill.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 6738c47..7b28d9f 100644 --- a/mm

Re: [PATCH] mm, oom: Fix race when selecting process to kill

2013-11-07 Thread Sameer Nanda
On Wed, Nov 6, 2013 at 4:35 PM, David Rientjes wrote: > On Wed, 6 Nov 2013, Sameer Nanda wrote: > >> David -- I think we can make the duration that the tasklist_lock is >> held smaller by consolidating the process selection logic that is >> currently split a

Re: [PATCH] mm, oom: Fix race when selecting process to kill

2013-11-07 Thread Sameer Nanda
On Wed, Nov 6, 2013 at 4:35 PM, David Rientjes rient...@google.com wrote: On Wed, 6 Nov 2013, Sameer Nanda wrote: David -- I think we can make the duration that the tasklist_lock is held smaller by consolidating the process selection logic that is currently split across select_bad_process

Re: [PATCH] mm, oom: Fix race when selecting process to kill

2013-11-06 Thread Sameer Nanda
(adding back context from thread history) On Tue, Nov 5, 2013 at 5:18 PM, David Rientjes wrote: > On Tue, 5 Nov 2013, Sameer Nanda wrote: > >> The selection of the process to be killed happens in two spots -- first >> in select_bad_process and then a further refinement by lo

Re: [PATCH] mm, oom: Fix race when selecting process to kill

2013-11-06 Thread Sameer Nanda
(adding back context from thread history) On Tue, Nov 5, 2013 at 5:18 PM, David Rientjes rient...@google.com wrote: On Tue, 5 Nov 2013, Sameer Nanda wrote: The selection of the process to be killed happens in two spots -- first in select_bad_process and then a further refinement by looking

[PATCH] mm, oom: Fix race when selecting process to kill

2013-11-05 Thread Sameer Nanda
across the calls to both select_bad_process and oom_kill_process. Change-Id: I8f96b106b3257b5c103d6497bac7f04f4dff4e60 Signed-off-by: Sameer Nanda --- mm/oom_kill.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 6738c47..7bd3587 100644

[PATCH] mm, oom: Fix race when selecting process to kill

2013-11-05 Thread Sameer Nanda
across the calls to both select_bad_process and oom_kill_process. Change-Id: I8f96b106b3257b5c103d6497bac7f04f4dff4e60 Signed-off-by: Sameer Nanda sna...@chromium.org --- mm/oom_kill.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index