All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Rik van Riel <riel@conectiva.com.br>,
	William Lee Irwin III <wli@holomorphy.com>,
	sfkaplan@cs.amherst.edu, linux-mm@kvack.org
Subject: Re: [PATCH] modified segq for 2.5
Date: Mon, 09 Sep 2002 13:57:04 -0700	[thread overview]
Message-ID: <3D7D0B20.6E595E0B@digeo.com> (raw)
In-Reply-To: 3D7D09D7.2AE5AD71@digeo.com

Andrew Morton wrote:
> 
> Rik van Riel wrote:
> >
> > ...
> > > > Hmmm indeed, I forgot this.  Note that IO completion state is
> > > > too late, since then you'll have already pushed other pages
> > > > out to the inactive list...
> > >
> > > OK.  So how would you like to handle those pages?
> >
> > Move them to the inactive list the moment we're done writing
> > them, that is, the moment we move on to the next page. We
> > wouldn't want to move the last page from /var/log/messages to
> > the inactive list all the time ;)
> 
> The moment "who" has done writing them?  Some writeout
> comes in via shrink_foo() and a ton of writeout comes in
> via balance_dirty_pages(), pdflush, etc.
> 
> Do we need to distinguish between the various contexts?

Forget I said that.

I added this:

--- 2.5.34/fs/mpage.c~segq	Mon Sep  9 13:53:25 2002
+++ 2.5.34-akpm/fs/mpage.c	Mon Sep  9 13:54:07 2002
@@ -583,10 +583,9 @@ mpage_writepages(struct address_space *m
 				bio = mpage_writepage(bio, page, get_block,
 						&last_block_in_bio, &ret);
 			}
-			if ((current->flags & PF_MEMALLOC) &&
-					!PageActive(page) && PageLRU(page)) {
+			if (PageActive(page) && PageLRU(page)) {
 				if (!pagevec_add(&pvec, page))
-					pagevec_deactivate_inactive(&pvec);
+					pagevec_deactivate_active(&pvec);
 				page = NULL;
 			}
 			if (ret == -EAGAIN && page) {
@@ -612,7 +611,7 @@ mpage_writepages(struct address_space *m
 	 * Leave any remaining dirty pages on ->io_pages
 	 */
 	write_unlock(&mapping->page_lock);
-	pagevec_deactivate_inactive(&pvec);
+	pagevec_deactivate_active(&pvec);
 	if (bio)
 		mpage_bio_submit(WRITE, bio);
 	return ret;
--
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/

  reply	other threads:[~2002-09-09 20:57 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-15 14:24 [PATCH] modified segq for 2.5 Rik van Riel
2002-09-09  9:38 ` Andrew Morton
2002-09-09 11:40   ` Ed Tomlinson
2002-09-09 17:10     ` William Lee Irwin III
2002-09-09 18:58     ` Andrew Morton
2002-09-09 13:10   ` Rik van Riel
2002-09-09 19:03     ` Andrew Morton
2002-09-09 19:25       ` Rik van Riel
2002-09-09 19:55         ` Andrew Morton
2002-09-09 20:03           ` Rik van Riel
2002-09-09 20:51         ` Andrew Morton
2002-09-09 20:57           ` Andrew Morton [this message]
2002-09-09 21:09           ` Rik van Riel
2002-09-09 21:52             ` Andrew Morton
2002-09-09 22:41               ` Rik van Riel
2002-09-10  0:17                 ` Daniel Phillips
2002-09-09 22:49           ` William Lee Irwin III
2002-09-09 22:54             ` Rik van Riel
2002-09-09 23:32               ` William Lee Irwin III
2002-09-09 23:53                 ` Rik van Riel
2002-09-09 22:46   ` Daniel Phillips
2002-09-09 22:58     ` Andrew Morton
2002-09-09 23:40       ` William Lee Irwin III
2002-09-10  0:02         ` Andrew Morton
2002-09-10  0:21           ` William Lee Irwin III
2002-09-10  1:13             ` Andrew Morton
2002-09-10  1:50       ` Daniel Phillips
2002-09-10  2:02         ` Rik van Riel

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=3D7D0B20.6E595E0B@digeo.com \
    --to=akpm@digeo.com \
    --cc=linux-mm@kvack.org \
    --cc=riel@conectiva.com.br \
    --cc=sfkaplan@cs.amherst.edu \
    --cc=wli@holomorphy.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 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.