From: Andrew Morton <akpm@osdl.org>
To: Christoph Lameter <clameter@engr.sgi.com>
Cc: tshxiayu@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: what is the state of current after an mm_fault occurs?
Date: Thu, 5 Jan 2006 15:18:11 -0800 [thread overview]
Message-ID: <20060105151811.23f82ad8.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.62.0601051228320.7328@schroedinger.engr.sgi.com>
Christoph Lameter <clameter@engr.sgi.com> wrote:
>
> On Wed, 4 Jan 2006, Andrew Morton wrote:
>
> > > You mean in some pagefault place we do schedule()?
> >
> > We used to - that should no longer be the case. The TASK_RUNNING thing is
> > probably redundant now.
>
> The page fault handler calls the page allocator in various places
> which may sleep.
That's OK - they should all do set_current_state() before sleeping. It's
the bare schedule() without previously setting TASK_foo which is the
problem. We used to do that sort of thing in 2.4 as a lame yield point but
we really shouldn't be doing that at all anywhere any more.
> current may not point to the current process if the page fault handler was
> called from get_user_pages.
current always points at the current process. In the situation
ptrace->access_process_vm->get_user_pages->pagefault we'll have mm !=
current->mm.
next prev parent reply other threads:[~2006-01-05 23:18 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
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 [this message]
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=20060105151811.23f82ad8.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=clameter@engr.sgi.com \
--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®