Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1487031img; Tue, 19 Mar 2019 08:38:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWxewLtC2ySgr8zSHmT7vDTzSP6V3dDSqa8R8YfMwk346bHt85GYSDreSc3+II28M034DY X-Received: by 2002:a62:ee13:: with SMTP id e19mr2586648pfi.224.1553009892699; Tue, 19 Mar 2019 08:38:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553009892; cv=none; d=google.com; s=arc-20160816; b=VFEfbTwmc8Auu894mCHdjIuQF9EkIh8OT9H000FmgjZrlgyssTW5MLUHtt6Q33n/fG sfpi2cUOOksED7LpF4f2Lql/nMftRAGGWd7mjnaJ+LTOCvfu1g883aPmkRDKWmBNNqY/ 4YY43Q9sfowTjTcW05N2g6caGgqAgQW9jueODw4KqU2K6PKZmdnTBTChQ5RixZpJ/rv5 RuRfiiYv40/17YCVSoi4l486GvP70bEgujr2o0bbf3bHsBLe8IxzAXEEWYA+8wO/O0MR hjyftSCkLVJV9ojDcTIHrukPto8xpmDsTXigcFSUxo0uqE2pRFVTMdfvkxM3M91bteuP y86Q== 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=1unbtIvY5Ht57/xExEoU7Ql118n/fJ7lA1QdHqj8Odk=; b=ScmMLglyJkbSUw5Bp6uiFl3FvCh/bTAunaoZNXQSof+JKJUKG6mhZfspG6jCj8MhXz Js0XUNwVnNl+D2SYbXwURmC7cgy6OwGU4GM34KpcLsxsY+M6xKPw3+Sj8FJkgdcfWfw0 JdJJlPIvLL7uJDCBPmilZ/boBN9NLFyLvOu5qcOYcseyIrQdsyqRrzs0AUiLwMviZrUy iMrO0XoPcS9d5dM4zFArVChg/0BNw9gGJ6Cas8Q9Ln6u9hCPEtt2Du8Gkvvo8kg1VrmR EI7p/JYk/aqJBbTzy1hUSQYMlDuJQEtRpCGGmdF2H2cFc+QPvKX2RBE4P1hnfbkpLAaa 8pDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=aZpreJfZ; 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 g5si11593588pgc.122.2019.03.19.08.37.57; Tue, 19 Mar 2019 08:38:12 -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=aZpreJfZ; 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 S1727778AbfCSPgx (ORCPT + 99 others); Tue, 19 Mar 2019 11:36:53 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:42460 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726579AbfCSPgv (ORCPT ); Tue, 19 Mar 2019 11:36:51 -0400 Received: by mail-ot1-f65.google.com with SMTP id 103so2746354otd.9 for ; Tue, 19 Mar 2019 08:36:51 -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=1unbtIvY5Ht57/xExEoU7Ql118n/fJ7lA1QdHqj8Odk=; b=aZpreJfZigo3FKFLPUZju3pojwCEccRahWR3gpAo6ZfCqnm80KEjECkjhF+s7IRotx 5hw8tXb+CaJesSAIWhgcGCpQA7hZzzrZ+9f9SO7gvkUW5tGowDM/3iommlzv6U6burYI BNmd+EJvqFeLxFn81SfbhyntCt4bNsllLQoFNgz1f2lITd61wl+htoOGhnjBl014kN16 IUmyQXlvPOSXPDY++j0eWwbcpoyyqtUpOsmNnsshnqRnsUDfJiLYo9EeHXeyyaz763AC q8MEBln0Af2RbQ8eLac+I5cLVBSiQ1cCA2cpKMnBa4WuGFMYa31AV8rxXkUOkAyb1YHe A1+A== 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=1unbtIvY5Ht57/xExEoU7Ql118n/fJ7lA1QdHqj8Odk=; b=DDbPWbW9hYIEL5QX/CO2gj64Rj2JtfUDu93UrHOvIuc/M1x87exmUi/Je9n3tosGDt nq7kLwZFSsEk29dOkE2yOtyuOlayMNRj4Oem7iscHga81Jrfs9I0tK5THsDIMUUxKokK zr5Du3XGcWXqdJiSZzr28LZhbhy3LPiMuZ/3vu0nexjPM9IJLf70wV8gfpWwmNu1CkVt dyrjbApjdVeRnZRqvHxK8zbowSw4h2gif3WMpP9t1/oXvXSdYzj+ndekDPTOwiKZBotp nwxGYnruAIUj/xHZ/434JDcXG1US+C/zUVD9hnIdmLtJ7lmVsKVnJpTMhU9rura/sBMv Ld1g== X-Gm-Message-State: APjAAAVUIzQTxwwZAb1HwXZ8SYHzI4I2+frNtdBgHTbFOENMU5Irn3tO K6EvPbshn38Gv4pT//Neb7h2ocO7Ohb+EPijOGt58O85Zlo= X-Received: by 2002:a9d:2c23:: with SMTP id f32mr1985166otb.353.1553009810711; Tue, 19 Mar 2019 08:36:50 -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> <20190319084439.eya2pisiirattuil@kshutemo-mobl1> In-Reply-To: <20190319084439.eya2pisiirattuil@kshutemo-mobl1> From: Dan Williams Date: Tue, 19 Mar 2019 08:36:38 -0700 Message-ID: Subject: Re: [PATCH 2/2] mm/dax: Don't enable huge dax mapping by default To: "Kirill A. Shutemov" Cc: "Aneesh Kumar K.V" , =?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 Tue, Mar 19, 2019 at 1:45 AM Kirill A. Shutemov w= rote: > > 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=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 t= o 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 pag= es > > > > 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. What does "advertise its huge pages as THP" mean in practice? I think it's confusing that DAX, a facility that bypasses System RAM, is affected by a transparent_hugepage flag which is a feature for combining System RAM pages into larger pages. For the same reason that transparent_hugepage does not gate / control hugetlb operation is the same reason that transparent_hugepage should not gate / control DAX. A global setting to disable opportunistic large page mappings of System-RAM makes sense, but I don't see why that should read on DAX?