From: Marcelo Tosatti <marcelo@conectiva.com.br>
To: Rik van Riel <riel@conectiva.com.br>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-mm@kvack.org
Subject: Re: [PATCH]
Date: Mon, 20 Aug 2001 16:43:20 -0300 (BRT) [thread overview]
Message-ID: <Pine.LNX.4.21.0108201640010.538-100000@freak.distro.conectiva> (raw)
In-Reply-To: <Pine.LNX.4.33L.0108201133550.5646-100000@imladris.rielhome.conectiva>
Rik,
Think about a thread blocked on ->writepage() called from page_launder(),
which has gotten an additional reference on the page.
Any other thread looping on page_launder() will move the given page being
written to the active list, even if we should just drop the page as soon
as its writeout is finished.
That is just _one_ case the patch will do the wrong thing (there may be
more). I suggest more investigation before actually merging the patch in
the -ac tree.
On Mon, 20 Aug 2001, Rik van Riel wrote:
> Hi Alan,
>
> the following patch fixes reclaim_page() and page_launder() to
> correctly reactivate a page based one page->count value.
>
> Note that we shouldn't be hitting this code very much with the
> current immediate reactivation in __find_page_nolock(), but I
> guess it would be useful to have as a safety net against things
> like the shmem code and other areas I don't about ;)
>
> regards,
>
> Rik
> --
> IA64: a worthy successor to i860.
>
>
> --- linux-2.4.8-ac7/mm/vmscan.c.orig Mon Aug 20 11:29:24 2001
> +++ linux-2.4.8-ac7/mm/vmscan.c Mon Aug 20 11:30:46 2001
> @@ -456,7 +456,7 @@
>
> /* Page is or was in use? Move it to the active list. */
> if (PageReferenced(page) || page->age > 0 ||
> - (!page->buffers && page_count(page) > 1)) {
> + page_count(page) > (1 + !!page->buffers)) {
> del_page_from_inactive_clean_list(page);
> add_page_to_active_list(page);
> continue;
> @@ -594,7 +594,7 @@
>
> /* Page is or was in use? Move it to the active list. */
> if (PageReferenced(page) || page->age > 0 ||
> - (!page->buffers && page_count(page) > 1) ||
> + page_count(page) > (1 + !!page->buffers) ||
> page_ramdisk(page)) {
> del_page_from_inactive_dirty_list(page);
> add_page_to_active_list(page);
>
> --
> 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-mm.org/
>
--
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-mm.org/
next prev parent reply other threads:[~2001-08-20 19:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-20 14:42 [PATCH] Rik van Riel
2001-08-20 19:43 ` Marcelo Tosatti [this message]
2001-08-20 21:34 ` [PATCH] Rik van Riel
-- strict thread matches above, loose matches on Subject: below --
2001-08-15 17:35 [PATCH] Ben LaHaise
2001-08-15 17:40 ` [PATCH] Linus Torvalds
2001-08-15 17:53 ` [PATCH] Ben LaHaise
2001-08-15 18:26 ` [PATCH] Daniel Phillips
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=Pine.LNX.4.21.0108201640010.538-100000@freak.distro.conectiva \
--to=marcelo@conectiva.com.br \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-mm@kvack.org \
--cc=riel@conectiva.com.br \
/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