From: Andrew Morton <akpm@zip.com.au>
To: lkml <linux-kernel@vger.kernel.org>
Subject: aa-040-touch_buffer
Date: Tue, 19 Mar 2002 19:56:38 -0800 [thread overview]
Message-ID: <3C980876.C097A994@zip.com.au> (raw)
Move the touch_buffer() from bread into getblk().
Fair enough. The touch_buffer() call tells the VM "please don't evict
this page, I'm about to use it". Doing it in getblk() will provide
better coverage than doing it in bread(). I would actually prefer to
do it in get_hash_table(), but that's a minor detail.
=====================================
--- 2.4.19-pre3/fs/buffer.c~aa-040-touch_buffer Tue Mar 19 19:48:54 2002
+++ 2.4.19-pre3-akpm/fs/buffer.c Tue Mar 19 19:49:15 2002
@@ -1032,8 +1032,10 @@ struct buffer_head * getblk(kdev_t dev,
struct buffer_head * bh;
bh = get_hash_table(dev, block, size);
- if (bh)
+ if (bh) {
+ touch_buffer(bh);
return bh;
+ }
if (!grow_buffers(dev, block, size))
free_more_memory();
@@ -1196,7 +1198,6 @@ struct buffer_head * bread(kdev_t dev, i
struct buffer_head * bh;
bh = getblk(dev, block, size);
- touch_buffer(bh);
if (buffer_uptodate(bh))
return bh;
ll_rw_block(READ, 1, &bh);
reply other threads:[~2002-03-20 3:59 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=3C980876.C097A994@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox