[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121024011356.GA6400@kernel.org>
Date: Wed, 24 Oct 2012 09:13:56 +0800
From: Shaohua Li <shli@...nel.org>
To: Rik van Riel <riel@...hat.com>
Cc: Hugh Dickins <hughd@...gle.com>,
Konstantin Khlebnikov <khlebnikov@...nvz.org>,
Minchan Kim <minchan@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Wu Fengguang <fengguang.wu@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH RFC] mm/swap: automatic tuning for swapin readahead
On Tue, Oct 23, 2012 at 09:41:00AM -0400, Rik van Riel wrote:
> On 10/23/2012 01:51 AM, Shaohua Li wrote:
>
> >I have no strong point against the global state method. But I'd agree making the
> >heuristic simple is preferred currently. I'm happy about the patch if the '+1'
> >is removed.
>
> Without the +1, how will you figure out when to re-enable readahead?
Below code in swapin_nr_pages can recover it.
+ if (offset == prev_offset + 1 || offset == prev_offset - 1)
+ pages <<= 1;
Not perfect, but should work in some sort. This reminds me to think if
pagereadahead flag is really required, hit in swap cache is a more reliable way
to count readahead hit, and as Hugh mentioned, swap isn't vma bound.
Thanks,
Shaohua
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists