public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 1/2] PF_DEAD: cleanup usage
Date: Sat, 26 Nov 2005 22:21:14 +0300	[thread overview]
Message-ID: <4388B5AA.34CE5294@tv-sign.ru> (raw)
In-Reply-To: Pine.LNX.4.64.0511260949030.13959@g5.osdl.org

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

  reply	other threads:[~2005-11-26 18:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-24 16:02 [PATCH 1/2] PF_DEAD: cleanup usage Oleg Nesterov
2005-11-25  5:12 ` Ingo Molnar
2005-11-25 18:01   ` Linus Torvalds
2005-11-26 10:46     ` Oleg Nesterov
2005-11-26 17:55       ` Linus Torvalds
2005-11-26 19:21         ` Oleg Nesterov [this message]
2005-11-26 18:47           ` Linus Torvalds
2005-11-27 12:18             ` Ingo Molnar
2005-11-27 13:02             ` Oleg Nesterov
2005-11-27 11:55     ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4388B5AA.34CE5294@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox