From 751562e24fc7e6b78eaaabd9389a0e09514f8a14 Mon Sep 17 00:00:00 2001 From: Fengguang Wu Date: Tue, 16 Oct 2007 01:24:32 -0700 Subject: [PATCH] --- yaml --- r: 69593 b: refs/heads/master c: 0bb7ba6b9c358c12084a3cbc6ac08c8d1e973937 h: refs/heads/master i: 69591: 2484dc5b62aca1879bb8f00c3598559f60133edc v: v3 --- [refs] | 2 +- trunk/include/linux/fs.h | 3 +-- trunk/mm/filemap.c | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index d44e548d27c2..e80e34285692 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 937085aa35cc873d427d250a1e304d641af24628 +refs/heads/master: 0bb7ba6b9c358c12084a3cbc6ac08c8d1e973937 diff --git a/trunk/include/linux/fs.h b/trunk/include/linux/fs.h index 7a998c49a086..8250811081ff 100644 --- a/trunk/include/linux/fs.h +++ b/trunk/include/linux/fs.h @@ -703,8 +703,7 @@ struct file_ra_state { there are only # of pages ahead */ unsigned int ra_pages; /* Maximum readahead window */ - unsigned long mmap_hit; /* Cache hit stat for mmap accesses */ - unsigned long mmap_miss; /* Cache miss stat for mmap accesses */ + int mmap_miss; /* Cache miss stat for mmap accesses */ unsigned long prev_index; /* Cache last read() position */ unsigned int prev_offset; /* Offset where last read() ended in a page */ }; diff --git a/trunk/mm/filemap.c b/trunk/mm/filemap.c index 15c8413ee929..5dc18d76e703 100644 --- a/trunk/mm/filemap.c +++ b/trunk/mm/filemap.c @@ -1349,7 +1349,7 @@ int filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) * Do we miss much more than hit in this file? If so, * stop bothering with read-ahead. It will only hurt. */ - if (ra->mmap_miss > ra->mmap_hit + MMAP_LOTSAMISS) + if (ra->mmap_miss > MMAP_LOTSAMISS) goto no_cached_page; /* @@ -1375,7 +1375,7 @@ int filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) } if (!did_readaround) - ra->mmap_hit++; + ra->mmap_miss--; /* * We have a locked page in the page cache, now we need to check