Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1168072img; Tue, 19 Mar 2019 01:45:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyu3WNwr0+BnJIaLrhn3O7NiD8c9y7vz1Cai4aGwAg+Y14IzbJeBiDxHZ3F4jaj95INhdpe X-Received: by 2002:a63:ee04:: with SMTP id e4mr10552618pgi.310.1552985135814; Tue, 19 Mar 2019 01:45:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552985135; cv=none; d=google.com; s=arc-20160816; b=Abbv4/xSp9QK46393JiUqoTGH+3IZDJ7TLAynjO8xpZaNN6mwTiG95cX+1r1uosLML Jk5jliQNFU3NiijExA5u9/GMJPkWBfcNVASWwJ6tCmtLXdW22PP1O4RrUa/L9yNDCH3s jeJhiLVjb7n+cUZxu6oFK2y4//XvFMkQ4ayD/GsMDwtHDx4j+mgnA1Q4bIsYq96Me21A 3yAGYIYWXZ2/H8SLeZM+S27uqB7k5L+oobQLe99fDXMhZ7bMhRUKZ0r3vicSz+0Vptkj NNePkGENoo3UHoDn9obARwIgEDjiErM63QFFn/b3q4jqkugujz4phmcpuCE8SPATxNx1 zV3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qAR3a4Tp536S5BF0fcnDXo7BSqIJ+Wix2hz2G88QfYw=; b=uC3962QfDgha4mLa1PvHYbK5ncIl22U4p8860nlMmx2k9vGA5xDDJ/ZH4V3afk+ohJ F55OxzmUPuiAknDf8+DtkdFbcEg+HHhEcOEI/glWmw0hXKwM2Ns219YwTpRaSNmWeDFH N5MqZHvO2jf7RBLz02jq1j5Kr5j1zx92ehggOliAogGZPffhhJdnZPxUqQSJ84dWSZ2Z 45mQeiiDr+wYRUvoohRatPqqWQUnnmOPYC3AM24Y5swwtUDSneGXZ/LDJbv9i9sTPTGm gMOMhPhZVCMWT6I776o8L0zLiZyfxKOXypmZeZODrkvphmO1otxwg/EDakDm7MNkDAtn iryQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=H2yafXhC; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c23si2563227pgj.27.2019.03.19.01.45.20; Tue, 19 Mar 2019 01:45:35 -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; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=H2yafXhC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727109AbfCSIoq (ORCPT + 99 others); Tue, 19 Mar 2019 04:44:46 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35398 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725978AbfCSIop (ORCPT ); Tue, 19 Mar 2019 04:44:45 -0400 Received: by mail-pf1-f194.google.com with SMTP id j5so13231695pfa.2 for ; Tue, 19 Mar 2019 01:44:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=qAR3a4Tp536S5BF0fcnDXo7BSqIJ+Wix2hz2G88QfYw=; b=H2yafXhCxww2Ui/9GWn4Ibv+5222qc24hBAoz7mopK6XBNEl8YsyIGoBL4mxVsgNv1 GBLIgNc751rNEJNNZENFQqArXrc9hT/wJVJv9horcQyoLACuk68xKiqmJDy1NxWUxFva VQbtkyhDQ4rS0v3TVhd+NS2TH8HT5XPiJmO2JYXNLOncoVFhe9x//OOexFxs4/jcGHdm Xa15eF/S8SUSaWh1XHCQoRMwCEd1gqxIO8goZoHmaDIwUbJwUiyxWSZgNnfgofVsrtIV b2YcyuElYoq66Y/1fXxI3tZGT0u+gr9rRYiYlBRKIlW2MHnJDFRhsVBxbVMxnjBFoexi O4Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=qAR3a4Tp536S5BF0fcnDXo7BSqIJ+Wix2hz2G88QfYw=; b=sKLyCkdV3VlKrKNE/V3wnGnKBAl6jBTcNyMfV6Mm2nzOe6S8UjtX6Z0QolBexQWsPV mONrlhUkSyQGBFHxTrc+HkLgCTk3ZfJgRWnMwvtCsDPc5F3ZWUB+6TKB3T5GR6wACgCF RU4HfF5EQkR132orG8/UNPoy1XZRCaBHIDHOjw5G9T+RC7GZdOX/z1SxopSDq9owXAW4 AnkXCFbmL1Tr22rmsH6UVuftX+nlnymKPUSF8scpxkEVM0TJKtp6pqCCw/FY8FkUYu7F GT8/ErEl+/UQI1bAQ7WEwD48UYPigUsOZ+y9qJqglIikJAcEdGIkGViQqsK6oJpterCi z0gQ== X-Gm-Message-State: APjAAAXN2o9UdQk+mze4sOVUpLscxdX7eCUFaCWYwVaOfefcfZah7Bks bflv5ObMdWz/AJgqPkP9JRf/Yw== X-Received: by 2002:a63:f905:: with SMTP id h5mr723037pgi.223.1552985084044; Tue, 19 Mar 2019 01:44:44 -0700 (PDT) Received: from kshutemo-mobl1.localdomain ([192.55.54.45]) by smtp.gmail.com with ESMTPSA id g188sm23542592pfc.24.2019.03.19.01.44.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Mar 2019 01:44:43 -0700 (PDT) Received: by kshutemo-mobl1.localdomain (Postfix, from userid 1000) id 5C088300B98; Tue, 19 Mar 2019 11:44:39 +0300 (+03) Date: Tue, 19 Mar 2019 11:44:39 +0300 From: "Kirill A. Shutemov" To: Dan Williams Cc: "Aneesh Kumar K.V" , Michal =?utf-8?B?U3VjaMOhbmVr?= , Oliver , Jan Kara , linux-nvdimm , Linux Kernel Mailing List , Linux MM , Ross Zwisler , Andrew Morton , linuxppc-dev , "Kirill A . Shutemov" Subject: Re: [PATCH 2/2] mm/dax: Don't enable huge dax mapping by default Message-ID: <20190319084439.eya2pisiirattuil@kshutemo-mobl1> References: <20190228083522.8189-1-aneesh.kumar@linux.ibm.com> <20190228083522.8189-2-aneesh.kumar@linux.ibm.com> <87k1hc8iqa.fsf@linux.ibm.com> <20190306124453.126d36d8@naga.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 13, 2019 at 09:07:13AM -0700, Dan Williams wrote: > On Wed, Mar 6, 2019 at 4:46 AM Aneesh Kumar K.V > wrote: > > > > On 3/6/19 5:14 PM, Michal Such?nek wrote: > > > On Wed, 06 Mar 2019 14:47:33 +0530 > > > "Aneesh Kumar K.V" wrote: > > > > > >> Dan Williams writes: > > >> > > >>> On Thu, Feb 28, 2019 at 1:40 AM Oliver wrote: > > >>>> > > >>>> On Thu, Feb 28, 2019 at 7:35 PM Aneesh Kumar K.V > > >>>> wrote: > > > > > >> Also even if the user decided to not use THP, by > > >> echo "never" > transparent_hugepage/enabled , we should continue to map > > >> dax fault using huge page on platforms that can support huge pages. > > > > > > Is this a good idea? > > > > > > This knob is there for a reason. In some situations having huge pages > > > can severely impact performance of the system (due to host-guest > > > interaction or whatever) and the ability to really turn off all THP > > > would be important in those cases, right? > > > > > > > My understanding was that is not true for dax pages? These are not > > regular memory that got allocated. They are allocated out of /dev/dax/ > > or /dev/pmem*. Do we have a reason not to use hugepages for mapping > > pages in that case? > > The problem with the transparent_hugepage/enabled interface is that it > conflates performing compaction work to produce THP-pages with the > ability to map huge pages at all. That's not [entirely] true. transparent_hugepage/defrag gates heavy-duty compaction. We do only very limited compaction if it's not advised by transparent_hugepage/defrag. I believe DAX has to respect transparent_hugepage/enabled. Or not advertise its huge pages as THP. It's confusing for user. -- Kirill A. Shutemov