From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: kosaki.motohiro@jp.fujitsu.com,
Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@redhat.com>,
Lee Schermerhorn <lee.schermerhorn@hp.com>,
Nick Piggin <npiggin@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] splitlru: BDI_CAP_SWAP_BACKED
Date: Sun, 29 Jun 2008 17:48:59 +0900 [thread overview]
Message-ID: <20080629173841.37CD.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0806290122330.21758@blonde.site>
> The split-lru patches put file and swap-backed pages on different lrus.
> shmem/tmpfs pages are awkward because they are swap-backed file pages.
> Since it's difficult to change lru midstream, they are treated as swap-
> backed throughout, with SetPageSwapBacked on allocation in shmem_getpage.
>
> However, splice read (used by loop and sendfile) and readahead* allocate
> pages first, add_to_page_cache_lru, and then call into the filesystem
> through ->readpage. Under memory pressure, the shmem pages arrive at
> add_to_swap_cache and hit its BUG_ON(!PageSwapBacked(page)).
>
> I've not yet found a better way to handle this than a "capability"
> flag in shmem_backing_dev_info, tested by add_to_page_cache_lru.
> And solely because it would look suspicious without it, set that
> BDI_CAP_SWAP_BACKED in swap_backing_dev_info also.
>
> * readahead on shmem/tmpfs? I'd always thought ra_pages 0 prevented
> that; but in fact readahead(2), fadvise(POSIX_FADV_WILLNEED) and
> madvise(MADV_WILLNEED) all force_page_cache_readahead and get there.
>
> Signed-off-by: Hugh Dickins <hugh@veritas.com>
great.
I'm not sure about this patch is perfect.
but it seems makes sense and very good code.
So, I'll testing this patch for a while.
Rik, What do you think about it?
next prev parent reply other threads:[~2008-06-29 8:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-29 0:20 [PATCH] splitlru: shmem_getpage SetPageSwapBacked sooner Hugh Dickins
2008-06-29 0:22 ` [PATCH] splitlru: memcg swapbacked pages active Hugh Dickins
2008-06-29 8:19 ` KOSAKI Motohiro
2008-06-29 12:20 ` Hugh Dickins
2008-06-29 12:58 ` KOSAKI Motohiro
2008-06-29 13:51 ` Hugh Dickins
2008-06-30 2:44 ` KAMEZAWA Hiroyuki
2008-06-30 19:19 ` Hugh Dickins
2008-06-30 8:36 ` [RFC][PATCH] memcg: change shmem handler KAMEZAWA Hiroyuki
2008-06-30 19:52 ` Hugh Dickins
2008-07-01 0:56 ` kamezawa.hiroyu
2008-07-02 2:16 ` [RFC][PATCH] memcg: shmem swap cache KAMEZAWA Hiroyuki
2008-07-01 1:06 ` Re: Re: [RFC][PATCH] memcg: change shmem handler kamezawa.hiroyu
2008-07-03 7:15 ` Balbir Singh
2008-07-03 7:56 ` KAMEZAWA Hiroyuki
2008-06-29 0:24 ` [PATCH] splitlru: BDI_CAP_SWAP_BACKED Hugh Dickins
2008-06-29 8:48 ` KOSAKI Motohiro [this message]
2008-06-29 15:16 ` Rik van Riel
2008-06-30 2:53 ` KAMEZAWA Hiroyuki
2008-06-30 19:23 ` Hugh Dickins
2008-06-30 19:49 ` Rik van Riel
2008-06-30 20:55 ` Hugh Dickins
2008-06-30 21:17 ` Rik van Riel
2008-06-29 8:09 ` [PATCH] splitlru: shmem_getpage SetPageSwapBacked sooner KOSAKI Motohiro
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=20080629173841.37CD.KOSAKI.MOTOHIRO@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=hugh@veritas.com \
--cc=lee.schermerhorn@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
--cc=riel@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®