All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Stephen C. Tweedie" <sct@redhat.com>
To: Rik van Riel <riel@nl.linux.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linux MM <linux-mm@kvack.org>, Stephen Tweedie <sct@redhat.com>,
	Linux Kernel <linux-kernel@vger.rutgers.edu>
Subject: Re: 2.2.1{3,4,5pre*} VM bug found
Date: Thu, 27 Jan 2000 19:07:42 +0000 (GMT)	[thread overview]
Message-ID: <14480.38782.751251.577294@dukat.scot.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.10.10001250421090.482-100000@mirkwood.dummy.home>

Hi,

On Tue, 25 Jan 2000 04:27:43 +0100 (CET), Rik van Riel
<riel@nl.linux.org> said:

> Sometimes a process with tsk->state != TASK_RUNNABLE
> calls __get_free_pages(). When we're (almost) out of
> memory, the process will wake up kswapd and try to
> free some memory itself.

> In 2.2.15pre4 or when the call to try_to_free_pages()
> generates disk I/O, the task will call schedule().
> Since the task state != TASK_RUNNABLE, schedule() will
> immedately remove it from the run queue ...

Shouldn't be a problem.  Anywhere that we stall in try_to_free_pages()
to wait for disk IO, we obviously have to set task->state to
TASK_UNINTERRUPTIBLE, as we're about to block.  If we do that as a
result of disk IO, then we have necessarily already scheduled a wakeup
event which will set the task state back to runnable.

So, the only risk is that the call to try_to_free_pages() has the
unexpected side effect of setting the task state to TASK_RUNNABLE.  That
isn't a problem: the only effect it will have on the caller is to make a
call schedule() return sooner than expected.  

--Stephen
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

      parent reply	other threads:[~2000-01-27 19:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-25  3:27 2.2.1{3,4,5pre*} VM bug found Rik van Riel
2000-01-25 18:15 ` Andrea Arcangeli
2000-01-26  0:48   ` Rik van Riel
2000-01-27 19:09     ` Stephen C. Tweedie
2000-01-27 19:07 ` Stephen C. Tweedie [this message]

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=14480.38782.751251.577294@dukat.scot.redhat.com \
    --to=sct@redhat.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.org \
    --cc=riel@nl.linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.