Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp220552ybl; Tue, 7 Jan 2020 17:41:00 -0800 (PST) X-Google-Smtp-Source: APXvYqxisLAldOc+lHBOUyxnOqupuhGJ85JaBiJOQZ8TrommbJ9IBebUo0Tc9sKrq+ujg6Pqu5WG X-Received: by 2002:a9d:784b:: with SMTP id c11mr2284617otm.246.1578447660702; Tue, 07 Jan 2020 17:41:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578447660; cv=none; d=google.com; s=arc-20160816; b=hhyM7hqYazGAtaRWyJDNphxgUTSTg7Y5zcQ6T8gYrFdfGy1ajDBjEqeEXWW7QKBYPZ RzOnc7AX7LI2QWXPsBdrXcCZXT+sSIEGctLE86DD2Brbj7zr8KbI/Bw6sgatzNCmlMEP v4LMKhcxAuPiUE4WAB/g3cI6FDEEON+5/CbFH2whUkCP3IeJUUoFxMAFw3xB+ZN4wUgk rJfxFC014ukwxrXwBpJFNxwkEtlSBrUSCoo5ulSeBzmQ2WRVxv3K1J5xQvTwibUhr06i dw8JSpg/2JsJoxCHiyjLn5z6SUho30f041rJh88VhEDNWN1Z7NJgaPGrGFMbirnRtqFP UA3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=/d9k45/z7659u+xtEjN+MYx3Q6GpIJRf/rpR3Gk/DdU=; b=CcMi9Xq1z8AXsSnWjWgzXFnHq/YCJtipSa6VH/c9UihBytmgXbxgekeeRhZ9uClh04 exbCTiQPIjNptz/gXDDs8OuQe84UI+vyRQLEOeih8sZ7RxhPGDmO2xctebb52nirBTox rPKEhy4uXjdATnnvWDi2W0W0Oh2pwkR3fexvElCTyhKigF8LHfJktsz7H2A1MYI5Jizu JSrMNCu9zh+DDXipNMvoUFSo6RhKkT688ItfKnddvc2ixoAy3iIqJ3IipPNWCsaY0uVZ xZfezDXn1KWrZokqrdbjqYuBjHqr8UjojJH7p2DlCDXejLh+Q+eqXzE3U9I/tlNhaAyl EujA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=YgTkFvh6; 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 c5si1011752oig.75.2020.01.07.17.40.49; Tue, 07 Jan 2020 17:41:00 -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; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=YgTkFvh6; 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 S1726916AbgAHBjk (ORCPT + 99 others); Tue, 7 Jan 2020 20:39:40 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:38222 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726111AbgAHBjj (ORCPT ); Tue, 7 Jan 2020 20:39:39 -0500 Received: by mail-ot1-f68.google.com with SMTP id d7so2028894otf.5 for ; Tue, 07 Jan 2020 17:39:39 -0800 (PST) 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; bh=/d9k45/z7659u+xtEjN+MYx3Q6GpIJRf/rpR3Gk/DdU=; b=YgTkFvh6k7M6dHhTjbBTUDG+NIIUI6w5fWZZA+SRtfvALbUkv5kvWYonJKu3sSN8bN b+37/Q5KLz31UR0SYudLvDmy3JK9UFCkDIiMhXQQj3dHQVUjo9J9ywjL/XUPmwYswP+/ xeZnbYsjQkynkvVrvx19nSACawRXUpVW3q/vIubfYBFV7v5sMRYWA0QCbBX53/Lh0Y7W ilS3gDYmvch66jqOGL1GQp/MCtciI6dWOmQeI8tXQSnJmFLQE2FOeA4lxSiGMCYIgXRf 1q2zJd9/QHTXMPJFdyvYajbTtvIkBgU7ptveduecznGjcWJeA/35nNkhH+y9tInkFeK1 ra9w== 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; bh=/d9k45/z7659u+xtEjN+MYx3Q6GpIJRf/rpR3Gk/DdU=; b=RD7LVQkFhBXBivF22wpZEpLVonmBKmVTq8G9D1+LykFBQrH1t7elrNMgO/BcX/TX2p OFnM/GPsjD2w9/08fcJa3hHu/ZqNywSRjTQiltOwdB2XDpZgY1XZSM/Qd4mbDjSEL2HY R1FOLxtG99LY4lKilhVNfZRwgrwXpCu4FvleIeYZrEmG0VWbeKK0tYgr1TXuepAu7j06 1aoLOXYoXv4Ok0aiD1bWFpIC8V3j6Q7BPlS81uWjCt4hjkmvzchCVylNwrdDO9uhBnWu xPosyvxT2kkVBzzZbTJKJlz3lIL7yLh+rg7+ZuM0c57hKtC9J+8XuDBXEsarJkgIZ9sU //JQ== X-Gm-Message-State: APjAAAV0EjsSp/ptEBLjLunkDEs821JJTCQKCaJIDfk9ouOwIC23pW7o dV/MlB89Xh3nSuGLKn7fREem6kT0pukieQboX9/+Tw== X-Received: by 2002:a9d:68cc:: with SMTP id i12mr2328311oto.207.1578447579439; Tue, 07 Jan 2020 17:39:39 -0800 (PST) MIME-Version: 1.0 References: <20191212182238.46535-1-brho@google.com> <20191212182238.46535-3-brho@google.com> <06108004-1720-41EB-BCAB-BFA8FEBF4772@oracle.com> <65FB6CC1-3AD2-4D6F-9481-500BD7037203@oracle.com> <20191213171950.GA31552@linux.intel.com> <20200107190522.GA16987@linux.intel.com> <08a36944-ad5a-ca49-99b3-d3908ce0658b@google.com> <20200108012014.GF16987@linux.intel.com> In-Reply-To: <20200108012014.GF16987@linux.intel.com> From: Dan Williams Date: Tue, 7 Jan 2020 17:39:28 -0800 Message-ID: Subject: Re: [PATCH v5 2/2] kvm: Use huge pages for DAX-backed files To: Sean Christopherson Cc: Barret Rhoden , Liran Alon , Paolo Bonzini , David Hildenbrand , Dave Jiang , Alexander Duyck , linux-nvdimm , X86 ML , KVM list , Linux Kernel Mailing List , "Zeng, Jason" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 7, 2020 at 5:20 PM Sean Christopherson wrote: > > On Tue, Jan 07, 2020 at 02:19:06PM -0500, Barret Rhoden wrote: > > On 1/7/20 2:05 PM, Sean Christopherson wrote: > > >Hopefully you haven't put too much effort into the rework, because I want > > >to commandeer the proposed changes and use them as the basis for a more > > >aggressive overhaul of KVM's hugepage handling. Ironically, there's a bug > > >in KVM's THP handling that I _think_ can be avoided by using the DAX > > >approach of walking the host PTEs. > > > > > >I'm in the process of testing, hopefully I'll get a series sent out later > > >today. If not, I should at least be able to provide an update. > > > > Nice timing. I was just about to get back to this, so I haven't put any > > time in yet. =) > > > > Please CC me, and I'll try your patches out on my end. > > Will do. Barring last minute hiccups, the code is ready, just need to > finish off a few changelogs. Should get it out early tomorrow. > > One question that may help avoid some churn: are huge DAX pages not > tracked as compound pages? The comment from your/this patch is pretty > unequivocal, but I wanted to double check that they will really return > false for PageCompound(), as opposed to only returning false for > PageTransCompoundMap(). PageCompound() returns false. > > /* > * DAX pages do not use compound pages. ... > */ > None of the head / tail page infrastructure is set up for dax pages. They are just independent 'struct page' objects that are opportunistically mapped by different pte sizes in the dax core.