Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69593
b: refs/heads/master
c: 0bb7ba6
h: refs/heads/master
i:
  69591: 2484dc5
v: v3
  • Loading branch information
Fengguang Wu authored and Linus Torvalds committed Oct 16, 2007
1 parent 372a57a commit 751562e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 937085aa35cc873d427d250a1e304d641af24628
refs/heads/master: 0bb7ba6b9c358c12084a3cbc6ac08c8d1e973937
3 changes: 1 addition & 2 deletions trunk/include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};
Expand Down
4 changes: 2 additions & 2 deletions trunk/mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand All @@ -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
Expand Down

0 comments on commit 751562e

Please sign in to comment.