diff options
author | Fengguang Wu <wfg@mail.ustc.edu.cn> | 2007-10-16 04:24:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:42:52 -0400 |
commit | 0bb7ba6b9c358c12084a3cbc6ac08c8d1e973937 (patch) | |
tree | 81dc745c660557af4d9ea8b9816846d0395ece20 /mm/filemap.c | |
parent | 937085aa35cc873d427d250a1e304d641af24628 (diff) |
readahead: mmap read-around simplification
Fold file_ra_state.mmap_hit into file_ra_state.mmap_miss and make it an int.
Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 |