From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758938AbcIHSKo (ORCPT ); Thu, 8 Sep 2016 14:10:44 -0400 Received: from mga06.intel.com ([134.134.136.31]:26153 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758801AbcIHSKk (ORCPT ); Thu, 8 Sep 2016 14:10:40 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,301,1470726000"; d="scan'208";a="6230723" From: "Huang\, Ying" To: Anshuman Khandual Cc: "Huang\, Ying" , Andrew Morton , , , , , , , Hugh Dickins , Shaohua Li , Minchan Kim , Rik van Riel , Andrea Arcangeli , "Kirill A . Shutemov" Subject: Re: [PATCH -v3 07/10] mm, THP, swap: Support to add/delete THP to/from swap cache References: <1473266769-2155-1-git-send-email-ying.huang@intel.com> <1473266769-2155-8-git-send-email-ying.huang@intel.com> <57D128A9.3030306@linux.vnet.ibm.com> Date: Thu, 08 Sep 2016 11:10:38 -0700 In-Reply-To: <57D128A9.3030306@linux.vnet.ibm.com> (Anshuman Khandual's message of "Thu, 8 Sep 2016 14:30:25 +0530") Message-ID: <8760q65kkh.fsf@yhuang-mobile.sh.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Anshuman, Thanks for comments! Anshuman Khandual writes: > On 09/07/2016 10:16 PM, Huang, Ying wrote: >> From: Huang Ying >> >> With this patch, a THP (Transparent Huge Page) can be added/deleted >> to/from the swap cache as a set of sub-pages (512 on x86_64). >> >> This will be used for the THP (Transparent Huge Page) swap support. >> Where one THP may be added/delted to/from the swap cache. This will >> batch the swap cache operations to reduce the lock acquire/release times >> for the THP swap too. >> >> Cc: Hugh Dickins >> Cc: Shaohua Li >> Cc: Minchan Kim >> Cc: Rik van Riel >> Cc: Andrea Arcangeli >> Cc: Kirill A. Shutemov >> Signed-off-by: "Huang, Ying" >> --- >> include/linux/page-flags.h | 2 +- >> mm/swap_state.c | 57 +++++++++++++++++++++++++++++++--------------- >> 2 files changed, 40 insertions(+), 19 deletions(-) >> >> diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h >> index 74e4dda..f5bcbea 100644 >> --- a/include/linux/page-flags.h >> +++ b/include/linux/page-flags.h >> @@ -314,7 +314,7 @@ PAGEFLAG_FALSE(HighMem) >> #endif >> >> #ifdef CONFIG_SWAP >> -PAGEFLAG(SwapCache, swapcache, PF_NO_COMPOUND) >> +PAGEFLAG(SwapCache, swapcache, PF_NO_TAIL) > > What is the reason for this change ? The commit message does not seem > to explain. Before this change, SetPageSwapCache() cannot be called for THP, after the change, SetPageSwapCache() could be called for the head page of the THP, but not the tail pages. Because we will never do that before this patch series. Best Regards, Huang, Ying