mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: jeff shia <tshxiayu@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: what is the state of current after an mm_fault occurs?
Date: Wed, 4 Jan 2006 17:48:08 -0800	[thread overview]
Message-ID: <20060104174808.7b882af8.akpm@osdl.org> (raw)
In-Reply-To: <7cd5d4b40601040240n79b2d654t33424e91059988a9@mail.gmail.com>

jeff shia <tshxiayu@gmail.com> wrote:
>
>        In my opinion, the state of current should be TASK_RUNNING
>  after an mm_fault occurs.But I donot know why the function of
>  handle_mm_fault() set the state of current TASK_RUNNING.

It was a long time ago.. 2.4.early, perhaps.

There was a place (maybe in the select() code) where we were doing
copy_*_user() while in state TASK_INTERRUPTIBLE.  And iirc there was a
place in the pagefault code which did schedule().  So we would occasionally
hit schedule() in state TASK_INTERRUPTIBLE, when we expected to be in state
TASK_RUNNING.

So we made handle_mm_fault() set TASK_RUNNING to prevent any further such
things.


  reply	other threads:[~2006-01-05  1:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-04 10:40 jeff shia
2006-01-05  1:48 ` Andrew Morton [this message]
2006-01-05  3:20   ` jeff shia
2006-01-05  3:23     ` Andrew Morton
2006-01-05 20:30       ` Christoph Lameter
2006-01-05 23:18         ` Andrew Morton
2006-01-05 21:17     ` Ram Gupta

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=20060104174808.7b882af8.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tshxiayu@gmail.com \
    /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

all inboxes | Powered by JetHome®