Received: by 10.192.165.148 with SMTP id m20csp986348imm; Fri, 27 Apr 2018 10:38:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrPWZn1+8qlMOSRF/h1UDKLfA/WD1lk1l3RL4ME+ql+s7uZh5gEPMSJpd0lxPTBdvJ0fibM X-Received: by 2002:a17:902:a704:: with SMTP id w4-v6mr3070194plq.5.1524850685491; Fri, 27 Apr 2018 10:38:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524850685; cv=none; d=google.com; s=arc-20160816; b=O4NKh63XTKu3JP+u7sgHE0q5Ql2oV5LOXec39sTgQhYSQJtJyx3gMHdHGHfGgjyS/J Qfx5qISJl6iPHaOf78eDhFI0510CvJm/zjUxglXpQ684ibBIwvc2iA4FbdE0na7ZSOsE DQv07cKaKzyhNXQpQg5mT8Cw3+lTpVNzbUjeIPZJwUCx+N7KblAstxEezX+vNVyPv3yT Tg7DLXofD5mvTIdVK1e8ASgsjydEm2SqRQpgY1Gn/bQkCAsUIDVgT0vFRpnHrIPokSX9 ujkv83vTr4VBUJ+sPk7t712YttAnwMJ1YwMxxmLWwiSTpsKf7tgI00Zp+JEuMOguNHgx A6nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=bHUEOtJ54dLWThjvjAc7zJxDeC3Ks6+iDkDT27zYHhA=; b=sDJuycZV2EyIS09z3bmkj+eJw7z9jU3NPWwjJMxJSKywlfdwG/fRBjyV0nmW/wG6uL zzssF6A+dgnH4YSHxb8sQIK92PkkfFnWH6wy17Shviue7vlyRtaGqDHrxfY9hLEZDrrP WYudK5M0nbPwMoJEs+v6ALeoRBFXv2rcZkqTWuD+debUxoL5qvDAvouxkkxbtSfkISqa prDngSTATe52/7owQwBEQXX8NV1EoioMZ/aYBUHSA1hmBkDofh3nA3nK4fHJKsq03PGo qApNZEhG+BEQLt4gtYk8h2OEU15uZ8Fgzzi608xUL36VnZoSyomAwix+RHjVZyhcIFgQ T06g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2-v6si1680931plz.226.2018.04.27.10.37.49; Fri, 27 Apr 2018 10:38:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758979AbeD0Rgg (ORCPT + 99 others); Fri, 27 Apr 2018 13:36:36 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46572 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758943AbeD0Rge (ORCPT ); Fri, 27 Apr 2018 13:36:34 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3RHOdOx111671 for ; Fri, 27 Apr 2018 13:36:33 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0b-001b2d01.pphosted.com with ESMTP id 2hm4ccj7t3-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 27 Apr 2018 13:36:32 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Apr 2018 18:36:31 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 27 Apr 2018 18:36:23 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3RHaMUi786870; Fri, 27 Apr 2018 17:36:22 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5CA1B5204D; Fri, 27 Apr 2018 17:26:57 +0100 (BST) Received: from thinkpad (unknown [9.167.246.46]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id DDB7A52045; Fri, 27 Apr 2018 17:26:55 +0100 (BST) Date: Fri, 27 Apr 2018 19:36:19 +0200 From: Gerald Schaefer To: Zi Yan Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Zi Yan , Vineet Gupta , linux-snps-arc@lists.infradead.org, Russell King , Christoffer Dall , Marc Zyngier , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Steve Capper , Kristina Martsenko , Dan Williams , Thomas Gleixner , Ingo Molnar , "Kirill A. Shutemov" , x86@kernel.org, Ralf Baechle , James Hogan , Michal Hocko , linux-mips@linux-mips.org, Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , "Aneesh Kumar K.V" , Ram Pai , Balbir Singh , Naoya Horiguchi , linuxppc-dev@lists.ozlabs.org, Martin Schwidefsky , Heiko Carstens , Janosch Frank , linux-s390@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org, "Huang, Ying" Subject: Re: [RFC PATCH 0/9] Enable THP migration for all possible architectures In-Reply-To: <20180426142804.180152-1-zi.yan@sent.com> References: <20180426142804.180152-1-zi.yan@sent.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18042717-0020-0000-0000-00000416CD49 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18042717-0021-0000-0000-000042ABDB51 Message-Id: <20180427193619.435eb53a@thinkpad> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-27_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804270167 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 26 Apr 2018 10:27:55 -0400 Zi Yan wrote: > From: Zi Yan > > Hi all, > > THP migration is only enabled on x86_64 with a special > ARCH_ENABLE_THP_MIGRATION macro. This patchset enables THP migration for > all architectures that uses transparent hugepage, so that special macro can > be dropped. Instead, THP migration is enabled/disabled via > /sys/kernel/mm/transparent_hugepage/enable_thp_migration. > > I grepped for TRANSPARENT_HUGEPAGE in arch folder and got 9 architectures that > are supporting transparent hugepage. I mechanically add __pmd_to_swp_entry() and > __swp_entry_to_pmd() based on existing __pte_to_swp_entry() and > __swp_entry_to_pte() for all these architectures, except tile which is going to > be dropped. This will not work on s390, the pmd layout is very different from the pte layout. Using __swp_entry/type/offset() on a pmd will go horribly wrong. I currently don't see a chance to make this work for us, so please make/keep this configurable, and do not configure it for s390. Regards, Gerald