[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHGf_=qs8-nE6y6EzNYUzgjGo0sMP5zvCc3=GNZmHct6mPecqg@mail.gmail.com>
Date: Mon, 13 Feb 2012 11:22:26 -0500
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To: Andrea Righi <andrea@...terlinux.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Minchan Kim <minchan.kim@...il.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Johannes Weiner <jweiner@...hat.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Rik van Riel <riel@...hat.com>,
Hugh Dickins <hughd@...gle.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Shaohua Li <shaohua.li@...el.com>,
Pádraig Brady <P@...igbrady.com>,
John Stultz <john.stultz@...aro.org>,
Jerry James <jamesjer@...terlinux.com>,
Julius Plenz <julius@...nz.com>, linux-mm <linux-mm@...ck.org>,
linux-fsdevel@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 3/3] fadvise: implement POSIX_FADV_NOREUSE
> @@ -1181,8 +1258,22 @@ page_ok:
> * When a sequential read accesses a page several times,
> * only mark it as accessed the first time.
> */
> - if (prev_index != index || offset != prev_offset)
> - mark_page_accessed(page);
> + if (prev_index != index || offset != prev_offset) {
> + int mode;
> +
> + mode = filemap_get_cache(mapping, index);
> + switch (mode) {
> + case FILEMAP_CACHE_NORMAL:
> + mark_page_accessed(page);
> + break;
> + case FILEMAP_CACHE_ONCE:
> + mark_page_usedonce(page);
> + break;
> + default:
> + WARN_ON_ONCE(1);
> + break;
Here is generic_file_read, right? Why don't you care write and page fault?
Powered by blists - more mailing lists