[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20131015103334.E3877E0090@blue.fi.intel.com>
Date: Tue, 15 Oct 2013 13:33:34 +0300 (EEST)
From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
To: Ning Qu <quning@...gle.com>
Cc: Andrea Arcangeli <aarcange@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Hugh Dickins <hughd@...gle.com>,
Al Viro <viro@...iv.linux.org.uk>,
Hugh Dickins <hughd@...gle.com>,
Wu Fengguang <fengguang.wu@...el.com>, Jan Kara <jack@...e.cz>,
Mel Gorman <mgorman@...e.de>, linux-mm@...ck.org,
Andi Kleen <ak@...ux.intel.com>,
Matthew Wilcox <willy@...ux.intel.com>,
Hillf Danton <dhillf@...il.com>, Dave Hansen <dave@...1.net>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Ning Qu <quning@...gle.com>
Subject: RE: [PATCH 04/12] mm, thp, tmpfs: split huge page when moving from
page cache to swap
Ning Qu wrote:
> in shmem_writepage, we have to split the huge page when moving pages
> from page cache to swap because we don't support huge page in swap
> yet.
>
> Signed-off-by: Ning Qu <quning@...il.com>
> ---
> mm/shmem.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/mm/shmem.c b/mm/shmem.c
> index 8fe17dd..68a0e1d 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -898,6 +898,13 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
> swp_entry_t swap;
> pgoff_t index;
>
> + /* TODO: we have to break the huge page at this point,
> + * since we have no idea how to recover a huge page from
> + * swap.
> + */
> + if (PageTransCompound(page))
> + split_huge_page(compound_trans_head(page));
> +
After the split you handle here only first small page of the huge page.
Is it what we want to do? Should we swap out all small pages of the huge
page?
--
Kirill A. Shutemov
--
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