Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3113248imc; Wed, 13 Mar 2019 09:08:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCOoW+VDU3EezoqgqHrbKSIDa0EQsRRdfv+i+PmHmKPoT/TCAFKPs76zgTJx8jMm3iJK+R X-Received: by 2002:a17:902:7784:: with SMTP id o4mr18153005pll.152.1552493284173; Wed, 13 Mar 2019 09:08:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552493284; cv=none; d=google.com; s=arc-20160816; b=YZDVuNMwxiZMgL+UnQULdueoYpmRnQDwp9FqRhAJXtLQr/gAuK+TtARQwe9S0W5VVA A8coN3R7SSvGr5Evvzxoi5cc8uP/jmpZa7VYnprFXvXWYGxin+S5j2dzqXelcEkyIlqN k5tikntvcV5AMU8Bpfhl2v2GOAIuxOQ6ECdcGlTtLHWi82pV8DYwpwgg4r09ZuRC/C7l KPd4XSEX5MN0g+LH7JJ/ldJs07zI2eQPzoC4DtXS7CdzsiqM0YDD83Xcb6N2R/Ec6ORL QqnImgfA7PiBXL+CbdCTPTXxI9RYAOrxmYhP7AzCbK/6qUnh4H54tv0iaoyLxR3SrKiB VBRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=/XfqRx4tzKzsjCcb8QbRLqX/uBHxzCtpu1uDPCItsOs=; b=UmdixQygPHXUn6BOyvsqDRmxnIA1y6T1H4xuCzGLeUdwZ/RCcCkKSAkPOcD+uYIgYa tYt5hEao2bI6bFVvmq3D4FUwHVxLNkQxlgCsZ4840EF2/wh14SB9MDugvfD8tLKSaIne 7oy7w8hU8BsT9P2E5i/wm0ci+CKa/0cEAoLZa9VwtdGa3nKFkRNSpeaG0ReJbpOjI2vk 7vGqL8XOWS7NqSc94910BPUVCC+nFNetbkUa4a3JJLRMU7dOTmBD4aJjstgSNUqf956u L7QRsue3txifAbAyh8+r1RzdLGxTmNBZ1OBpR7wv9bXEusI95JVSJwn64Kg9W0qP8SRb XTKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=Ev3mjXd6; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1si10054748pgr.92.2019.03.13.09.07.45; Wed, 13 Mar 2019 09:08:04 -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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=Ev3mjXd6; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726451AbfCMQH0 (ORCPT + 99 others); Wed, 13 Mar 2019 12:07:26 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:34631 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725893AbfCMQHZ (ORCPT ); Wed, 13 Mar 2019 12:07:25 -0400 Received: by mail-ot1-f67.google.com with SMTP id r19so2259497otn.1 for ; Wed, 13 Mar 2019 09:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=/XfqRx4tzKzsjCcb8QbRLqX/uBHxzCtpu1uDPCItsOs=; b=Ev3mjXd6En91xODIUX56pYwhJLO9DdmQ95Gif+qABOQYxSXLSsL3HdkZ996LpFM0Ok BNFXboh0vkQcZET1UNi2xWbfJOgLi7YJOBlDe07HQIOTkXhyuZZtxYx1Jr323nQBINw1 bCIVmxF4JR2efLcgr/ZOkQzDj5SYAbGOQud/xj7awoc+6yVUoor9qC0PAVErRf0dlx+t qM1zGEHB4PSIuwMXtFmThJuVWsfXkY8L4/6g612b2JAC90VycrbkkPGVtxjK+QjLV1tp zV3E3pIxFXDm4fJ1q4lhu5iiryNlMnlw3ajMFHOD83PMclLscUSXLEmMdZOnDZ62lqrK YZQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=/XfqRx4tzKzsjCcb8QbRLqX/uBHxzCtpu1uDPCItsOs=; b=Q4GrEd7BzY1WLQI4HuS7N3qpH1hXet4zyoBihZOe9/p4nkKFIjr8zkyj95a6cMIqQe VAPGjfAQU7MAZQ5pFy94VK3WMObcSzeH0T9S6lvoFgr/gVISCSqF1gdfkFT5nrorR+v3 jJzImuwvUderxZL+GCJ22lYAVrHNHxuMz5m+dBKOjjuIjFLONo/qePOW9orHR1cnhEKv P9NghoACOC8QC6ONb8i8RC+qJYlTyKLTZKGNqSylsHV8Sc+AoFt6Cj0HCT1iVBOwhU9G fxL4ChlXxJMf5Eg/CI7QhqgG7htpD6HydnbSwM+nnbDaTSEa0V6XUN/ed03a09+jkys0 nutQ== X-Gm-Message-State: APjAAAVj0C8GWjjYO00Iij1yhN/ECmZjnmSqIfuSkz12tF369ofL9ZKo /tzyodkqFCoCN23toe5yOIEIbZnxQ8oMcuc2SMn5QQ== X-Received: by 2002:a9d:224a:: with SMTP id o68mr16122221ota.214.1552493244500; Wed, 13 Mar 2019 09:07:24 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Dan Williams Date: Wed, 13 Mar 2019 09:07:13 -0700 Message-ID: Subject: Re: [PATCH 2/2] mm/dax: Don't enable huge dax mapping by default To: "Aneesh Kumar K.V" Cc: =?UTF-8?Q?Michal_Such=C3=A1nek?= , Oliver , Jan Kara , linux-nvdimm , Linux Kernel Mailing List , Linux MM , Ross Zwisler , Andrew Morton , linuxppc-dev , "Kirill A . Shutemov" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 6, 2019 at 4:46 AM Aneesh Kumar K.V wrote: > > On 3/6/19 5:14 PM, Michal Such=C3=A1nek 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 ma= p > >> 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. The compaction is a nop for dax because the memory is already statically allocated. If the administrator does not want dax to consume huge TLB entries then don't configure huge-page dax. If a hypervisor wants to force disable huge-page-configured device-dax instances after the fact it seems we need an explicit interface for that and not overload transparent_hugepage/enabled.