lkml.org 
[lkml]   [1999]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject2.3.[789] without aging in page cache
It seems to me that we are not setting anymore the referenced bit upon
succesfully find in the page/buffer cache.

This patch will give back the aging to the buffer and page cache (plus a
little optimization I couldn't avoid me to add using find_buffer directly
:). The touch_buffer in brelse is meaningless for me.

Index: linux/fs/buffer.c
===================================================================
RCS file: /var/cvs/linux/fs/buffer.c,v
retrieving revision 1.1.1.26
diff -u -r1.1.1.26 buffer.c
--- linux/fs/buffer.c 1999/06/28 15:07:22 1.1.1.26
+++ linux/fs/buffer.c 1999/06/29 18:31:16
@@ -785,8 +785,10 @@
int isize;

repeat:
- bh = get_hash_table(dev, block, size);
+ bh = find_buffer(dev, block, size);
if (bh) {
+ bh->b_count++;
+ touch_buffer(bh);
if (!buffer_dirty(bh)) {
bh->b_flushtime = 0;
}
@@ -910,8 +912,6 @@
*/
void __brelse(struct buffer_head * buf)
{
- touch_buffer(buf);
-
if (buf->b_count) {
buf->b_count--;
wake_up(&buffer_wait);
Index: linux/mm/filemap.c
===================================================================
RCS file: /var/cvs/linux/mm/filemap.c,v
retrieving revision 1.1.1.25
diff -u -r1.1.1.25 filemap.c
--- linux/mm/filemap.c 1999/06/25 13:34:46 1.1.1.25
+++ linux/mm/filemap.c 1999/06/29 18:25:14
@@ -359,6 +359,7 @@
if (page->offset == offset)
break;
}
+ set_bit(PG_referenced, &page->flags);
not_found:
return page;
}

Maybe that's the reason of the not too much fast kernel compile (someone
reported to the list) with the latest 2.3.x kernels?

Andrea


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.035 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site