Re: [PATCH 1/2] PF_DEAD: cleanup usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Linus Torvalds wrote:
> 
> > So in my opinion PF_DEAD has already slipped into the ->state partly.
> 
> You mis-understand.

Yes.

Ok, I see you point now, thanks.

Oleg.

> PF_DEAD has _always_ been about the task state, in a very serious way. It
> didn't "slip into" it. It always was very much about it.
> 
> The problem is that we touch "task->state" in a _lot_ of places: for
> example, when we take a page fault, we have to clear it, because we can't
> just run with some random task state (see top of __handle_mm_fault).
> 
> PF_DEAD was a "safe haven". It's somewhere that we _don't_ modify the word
> in many places, so it doesn't get lost, and we can do sanity checking (ie
> we can have things like "BUG_ON(tsk->flags & PF_DEAD)" to make sure that
> the task really is valid in a few places.
> 
> Now, arguably the task struct handling is solid enough that maybe we don't
> need this any more. But this is what it was all about: it was hidden away
> in a non-obvious place exactly _because_ we wanted it hidden away
> somewhere where the normal ops wouldn't ever touch it.
> 
>                         Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux