Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp576327img; Thu, 28 Feb 2019 04:35:28 -0800 (PST) X-Google-Smtp-Source: AHgI3IafSLLOsq03cr7tShcVbzvzsbXJpzTEzodpsEqw+Uiw14yMi3fayInetfJbEXVGfoyRhJ8p X-Received: by 2002:a65:44cb:: with SMTP id g11mr8360319pgs.29.1551357328582; Thu, 28 Feb 2019 04:35:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551357328; cv=none; d=google.com; s=arc-20160816; b=pgmGd3YWSIbvt8OJv9myLgeqGNU9qAnQLV/wSJ+gEMWci390lEo7/kRerYn2umug9E Hy7OyhlC/Qms7Y1ko2BIMlN5WvqlLdZRUCjf97aBTIvXQCH7uRPqmJKjs+4U6ilo8WaO 6UgBh7xRGl51OGGYWaEHEPjwBMfkk40i+N12VXxKY+0tUVNgRi5HMqoAcL/k8ztz9dqA XOG2MtzsiWcWCdSUI+5kDhNtNcFQYWaJWHkoX5H8GkBOqXylk3GhOD6B+BTFT33FLXVy 03Vp1NpT1iBer3j0WHIi3AVmXvbOEtBX+6FG2PDa5wcmxxA76NM9uIHoggTnpgf42ng3 D8UA== 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 :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject; bh=4QyDTHPfRYUyg1uIzcnJWCSuhYjooEcwCquoDnPlT8Q=; b=DtDSj8SELht+AdKVTNX0C448mZgi51thz+eHNZXwLkL0IObpX6rg6p4XeQi05vhkqH JIBgh7sn3tewETTHTIfWwuIw9ak16QeXnjlnrXWJO2islQUDH2IHuT/jV6oFASzg/6wQ SvE7lTtIbFrhJzGSDtX6ciGqmxO3rXoJxJmiZtZhg8Mu1nUk0reKXFwZAmBIfMH02/qi M8c2w2zWTy1bqjF1Gqoo38DIjn6ZpYbgCjHWAUQ2Svj/UU6gTVaEVxBGoW+sPiAHHhYf hIPd5x1kLTa/4eGQnHRAZ5iwmVqUpouRQigwaNAcf9/Q0SekpoVSegQlzS6H38f4sOdE CkiA== 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 128si17249692pgb.373.2019.02.28.04.35.12; Thu, 28 Feb 2019 04:35:28 -0800 (PST) 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 S1732542AbfB1MdF (ORCPT + 99 others); Thu, 28 Feb 2019 07:33:05 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55172 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726534AbfB1MdF (ORCPT ); Thu, 28 Feb 2019 07:33:05 -0500 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1SCTqoF116389 for ; Thu, 28 Feb 2019 07:33:04 -0500 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0a-001b2d01.pphosted.com with ESMTP id 2qxdymd9a8-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 28 Feb 2019 07:33:03 -0500 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 28 Feb 2019 12:33:02 -0000 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 28 Feb 2019 12:32:58 -0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1SCWvhx21299350 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Feb 2019 12:32:58 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DA460B2064; Thu, 28 Feb 2019 12:32:57 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 84842B206A; Thu, 28 Feb 2019 12:32:54 +0000 (GMT) Received: from [9.199.36.171] (unknown [9.199.36.171]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 28 Feb 2019 12:32:54 +0000 (GMT) Subject: Re: [PATCH 2/2] mm/dax: Don't enable huge dax mapping by default To: Jan Kara Cc: akpm@linux-foundation.org, "Kirill A . Shutemov" , mpe@ellerman.id.au, Ross Zwisler , "Oliver O'Halloran" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Dan Williams References: <20190228083522.8189-1-aneesh.kumar@linux.ibm.com> <20190228083522.8189-2-aneesh.kumar@linux.ibm.com> <20190228094011.GB22210@quack2.suse.cz> From: "Aneesh Kumar K.V" Date: Thu, 28 Feb 2019 18:02:53 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190228094011.GB22210@quack2.suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19022812-0072-0000-0000-000004017CE6 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010679; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000281; SDB=6.01167572; UDB=6.00609977; IPR=6.00948186; MB=3.00025780; MTD=3.00000008; XFM=3.00000015; UTC=2019-02-28 12:33:02 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19022812-0073-0000-0000-00004B54013E Message-Id: <2452a0b6-a90e-52b8-cb9f-0b5a7fafbe64@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-28_06:,, 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 mlxscore=0 impostorscore=0 mlxlogscore=985 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902280087 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/28/19 3:10 PM, Jan Kara wrote: > On Thu 28-02-19 14:05:22, Aneesh Kumar K.V wrote: >> Add a flag to indicate the ability to do huge page dax mapping. On architecture >> like ppc64, the hypervisor can disable huge page support in the guest. In >> such a case, we should not enable huge page dax mapping. This patch adds >> a flag which the architecture code will update to indicate huge page >> dax mapping support. >> >> Architectures mostly do transparent_hugepage_flag = 0; if they can't >> do hugepages. That also takes care of disabling dax hugepage mapping >> with this change. >> >> Without this patch we get the below error with kvm on ppc64. >> >> [ 118.849975] lpar: Failed hash pte insert with error -4 >> >> NOTE: The patch also use >> >> echo never > /sys/kernel/mm/transparent_hugepage/enabled >> to disable dax huge page mapping. >> >> Signed-off-by: Aneesh Kumar K.V > > Added Dan to CC for opinion. I kind of fail to see why you don't use > TRANSPARENT_HUGEPAGE_FLAG for this. I know that technically DAX huge pages > and normal THPs are different things but so far we've tried to avoid making > that distinction visible to userspace. I would also like to use the same flag. Was not sure whether it was ok. In fact that is one of the reason I hooked this to /sys/kernel/mm/transparent_hugepage/enabled. If we are ok with using same flag, we can kill the vma_is_dax() check completely. -aneesh