public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [patch 13/16] put in-memory filesystem dirty pages on the correct list
Date: Sat, 01 Jun 2002 01:43:44 -0700	[thread overview]
Message-ID: <3CF88940.29CFAE0F@zip.com.au> (raw)



Replaces SetPageDirty() with set_page_dirty() in several places related
to in-memory filesystems.

SetPageDirty() is basically always the wrong thing to do.  Pages should
be moved to the ->dirty_pages list when dirtied so that writeback can
see them.

Without this change, dirty pages against in-memory filesystems would
churn around on the inactive list all the time, rather than getting
pushed away onto the active list.  A minor efficiency thing.


=====================================

--- 2.5.19/mm/shmem.c~shmem	Sat Jun  1 01:18:13 2002
+++ 2.5.19-akpm/mm/shmem.c	Sat Jun  1 01:18:13 2002
@@ -854,7 +854,7 @@ shmem_file_write(struct file *file,const
 
 		flush_dcache_page(page);
 		if (bytes > 0) {
-			SetPageDirty(page);
+			set_page_dirty(page);
 			written += bytes;
 			count -= bytes;
 			pos += bytes;
@@ -1139,7 +1139,7 @@ static int shmem_symlink(struct inode * 
 		kaddr = kmap(page);
 		memcpy(kaddr, symname, len);
 		kunmap(page);
-		SetPageDirty(page);
+		set_page_dirty(page);
 		unlock_page(page);
 		page_cache_release(page);
 		up(&info->sem);
--- 2.5.19/mm/filemap.c~shmem	Sat Jun  1 01:18:13 2002
+++ 2.5.19-akpm/mm/filemap.c	Sat Jun  1 01:18:13 2002
@@ -450,7 +450,7 @@ int fail_writepage(struct page *page)
 	}
 
 	/* Set the page dirty again, unlock */
-	SetPageDirty(page);
+	set_page_dirty(page);
 	unlock_page(page);
 	return 0;
 }

-

                 reply	other threads:[~2002-06-01  8:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3CF88940.29CFAE0F@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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