diff options
-rw-r--r-- | include/linux/fs.h | 3 | ||||
-rw-r--r-- | mm/filemap.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 7a998c49a086..8250811081ff 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -703,8 +703,7 @@ struct file_ra_state { | |||
703 | there are only # of pages ahead */ | 703 | there are only # of pages ahead */ |
704 | 704 | ||
705 | unsigned int ra_pages; /* Maximum readahead window */ | 705 | unsigned int ra_pages; /* Maximum readahead window */ |
706 | unsigned long mmap_hit; /* Cache hit stat for mmap accesses */ | 706 | int mmap_miss; /* Cache miss stat for mmap accesses */ |
707 | unsigned long mmap_miss; /* Cache miss stat for mmap accesses */ | ||
708 | unsigned long prev_index; /* Cache last read() position */ | 707 | unsigned long prev_index; /* Cache last read() position */ |
709 | unsigned int prev_offset; /* Offset where last read() ended in a page */ | 708 | unsigned int prev_offset; /* Offset where last read() ended in a page */ |
710 | }; | 709 | }; |
diff --git a/mm/filemap.c b/mm/filemap.c index 15c8413ee929..5dc18d76e703 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1349,7 +1349,7 @@ retry_find: | |||
1349 | * Do we miss much more than hit in this file? If so, | 1349 | * Do we miss much more than hit in this file? If so, |
1350 | * stop bothering with read-ahead. It will only hurt. | 1350 | * stop bothering with read-ahead. It will only hurt. |
1351 | */ | 1351 | */ |
1352 | if (ra->mmap_miss > ra->mmap_hit + MMAP_LOTSAMISS) | 1352 | if (ra->mmap_miss > MMAP_LOTSAMISS) |
1353 | goto no_cached_page; | 1353 | goto no_cached_page; |
1354 | 1354 | ||
1355 | /* | 1355 | /* |
@@ -1375,7 +1375,7 @@ retry_find: | |||
1375 | } | 1375 | } |
1376 | 1376 | ||
1377 | if (!did_readaround) | 1377 | if (!did_readaround) |
1378 | ra->mmap_hit++; | 1378 | ra->mmap_miss--; |
1379 | 1379 | ||
1380 | /* | 1380 | /* |
1381 | * We have a locked page in the page cache, now we need to check | 1381 | * We have a locked page in the page cache, now we need to check |