From: Wu Fengguang <wfg@mail.ustc.edu.cn>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, Wu Fengguang <wfg@mail.ustc.edu.cn>
Subject: [patch 3/4] readahead: context based method - fix *remain counting
Date: Tue, 30 May 2006 16:40:33 +0800 [thread overview]
Message-ID: <348978814.17342@ustc.edu.cn> (raw)
Message-ID: <20060530084703.965331349@localhost.localdomain> (raw)
In-Reply-To: 20060530084030.274375770@localhost.localdomain
[-- Attachment #1: readahead-method-context-fix-remain.patch --]
[-- Type: text/plain, Size: 514 bytes --]
*remain in query_page_cache_segment() is over counted by 1, fix it.
Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn>
---
--- linux-2.6.17-rc4-mm3.orig/mm/readahead.c
+++ linux-2.6.17-rc4-mm3/mm/readahead.c
@@ -1334,7 +1334,7 @@ static unsigned long query_page_cache_se
index = radix_tree_scan_hole_backward(&mapping->page_tree,
offset - 1, ra_max);
- *remain = offset - index;
+ *remain = (offset - 1) - index;
if (offset == ra->readahead_index && ra_cache_hit_ok(ra))
count = *remain;
--
next prev parent reply other threads:[~2006-05-30 8:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-30 8:40 [patch 0/4] Adaptive readahead patchset V14 updates Wu Fengguang
2006-05-30 8:40 ` Wu Fengguang
2006-05-30 8:40 ` [patch 1/4] readahead: state based method - stand-alone size limit code Wu Fengguang
2006-05-30 8:40 ` Wu Fengguang
2006-05-30 8:40 ` Wu Fengguang [this message]
2006-05-30 8:40 ` [patch 3/4] readahead: context based method - fix *remain counting Wu Fengguang
2006-05-30 8:40 ` [patch 4/4] readahead: backward prefetching method - add use case comment Wu Fengguang
2006-05-30 8:40 ` Wu Fengguang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=348978814.17342@ustc.edu.cn \
--to=wfg@mail.ustc.edu.cn \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.