Re: task_numa_fault() && TASK_DEAD

2014-09-05 Thread Oleg Nesterov
On 09/04, Hugh Dickins wrote: > > On Thu, 4 Sep 2014, Oleg Nesterov wrote: > > On 09/04, Peter Zijlstra wrote: > > > On Wed, Sep 03, 2014 at 06:08:19PM +0200, Oleg Nesterov wrote: > > > > > > > And a stupid (really, I don't understand this code) question: > > > > > > > > /* for example, ksm

Re: task_numa_fault() && TASK_DEAD

2014-09-04 Thread Hugh Dickins
On Thu, 4 Sep 2014, Oleg Nesterov wrote: > On 09/04, Peter Zijlstra wrote: > > On Wed, Sep 03, 2014 at 06:08:19PM +0200, Oleg Nesterov wrote: > > > > > And a stupid (really, I don't understand this code) question: > > > > > > /* for example, ksmd faulting in a user's mm */ > > > if (!p->mm) > >

Re: task_numa_fault() && TASK_DEAD

2014-09-04 Thread Oleg Nesterov
On 09/04, Peter Zijlstra wrote: > > On Wed, Sep 03, 2014 at 06:08:19PM +0200, Oleg Nesterov wrote: > > > And a stupid (really, I don't understand this code) question: > > > > /* for example, ksmd faulting in a user's mm */ > > if (!p->mm) > > return; > > In general kernel thread

Re: task_numa_fault() && TASK_DEAD

2014-09-04 Thread Peter Zijlstra
On Wed, Sep 03, 2014 at 06:08:19PM +0200, Oleg Nesterov wrote: > On 09/02, Oleg Nesterov wrote: > > > > The usage of TASK_DEAD in task_numa_fault() is wrong in any case. > > Rik, I can't understand why task_numa_fault() needs this check at all, > but "if (p->state == TASK_DEAD)" looks certainly wr

Re: task_numa_fault() && TASK_DEAD

2014-09-03 Thread Rik van Riel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/03/2014 12:08 PM, Oleg Nesterov wrote: > On 09/02, Oleg Nesterov wrote: >> >> The usage of TASK_DEAD in task_numa_fault() is wrong in any >> case. > > Rik, I can't understand why task_numa_fault() needs this check at > all, but "if (p->state ==

task_numa_fault() && TASK_DEAD

2014-09-03 Thread Oleg Nesterov
On 09/02, Oleg Nesterov wrote: > > The usage of TASK_DEAD in task_numa_fault() is wrong in any case. Rik, I can't understand why task_numa_fault() needs this check at all, but "if (p->state == TASK_DEAD)" looks certainly wrong. You could replace this check with BUG_ON(p->state == TASK_DEAD). Perha