From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965416AbcIHJMT (ORCPT ); Thu, 8 Sep 2016 05:12:19 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:43877 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965358AbcIHJMQ (ORCPT ); Thu, 8 Sep 2016 05:12:16 -0400 X-IBM-Helo: d28dlp03.in.ibm.com X-IBM-MailFrom: khandual@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Thu, 08 Sep 2016 11:15:52 +0530 From: Anshuman Khandual User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Huang, Ying" , Andrew Morton CC: tim.c.chen@intel.com, dave.hansen@intel.com, andi.kleen@intel.com, aaron.lu@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Hugh Dickins , Shaohua Li , Minchan Kim , Rik van Riel Subject: Re: [PATCH -v3 01/10] mm, swap: Make swap cluster size same of THP size on x86_64 References: <1473266769-2155-1-git-send-email-ying.huang@intel.com> <1473266769-2155-2-git-send-email-ying.huang@intel.com> In-Reply-To: <1473266769-2155-2-git-send-email-ying.huang@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16090805-0004-0000-0000-00000317C1E8 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16090805-0005-0000-0000-00000F1FF468 Message-Id: <57D0FB10.5010609@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-08_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1609080082 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/07/2016 10:16 PM, Huang, Ying wrote: > From: Huang Ying > > In this patch, the size of the swap cluster is changed to that of the > THP (Transparent Huge Page) on x86_64 architecture (512). This is for > the THP swap support on x86_64. Where one swap cluster will be used to > hold the contents of each THP swapped out. And some information of the > swapped out THP (such as compound map count) will be recorded in the > swap_cluster_info data structure. > > For other architectures which want THP swap support, THP_SWAP_CLUSTER > need to be selected in the Kconfig file for the architecture. > > In effect, this will enlarge swap cluster size by 2 times on x86_64. > Which may make it harder to find a free cluster when the swap space > becomes fragmented. So that, this may reduce the continuous swap space > allocation and sequential write in theory. The performance test in 0day > shows no regressions caused by this. This patch needs to be split into two separate ones (1) Add THP_SWAP_CLUSTER config option (2) Enable CONFIG_THP_SWAP_CLUSTER for X86_64 The first patch should explain the proposal and the second patch should have 86_64 arch specific details, regressions etc as already been explained in the commit message.