From patchwork Fri Nov 9 20:39:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Barret Rhoden X-Patchwork-Id: 10676561 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7E0A314E2 for ; Fri, 9 Nov 2018 20:40:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CF802F214 for ; Fri, 9 Nov 2018 20:40:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6056A2F233; Fri, 9 Nov 2018 20:40:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1C2582F235 for ; Fri, 9 Nov 2018 20:40:29 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 47B1821BADAB9; Fri, 9 Nov 2018 12:40:28 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::749; helo=mail-qk1-x749.google.com; envelope-from=3gfdlwwqkdn4brhogoogle.comlinux-nvdimmlists.ab.org@flex--brho.bounces.google.com; receiver=linux-nvdimm@lists.01.org Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B997121A00AE6 for ; Fri, 9 Nov 2018 12:39:30 -0800 (PST) Received: by mail-qk1-x749.google.com with SMTP id c7so5806503qkg.16 for ; Fri, 09 Nov 2018 12:39:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=NWa7fS++m02mUdorr1OZ28RtYO0ZyNnH1VedLowKjpk=; b=Zvp30cs6sWWTO/IAq6ubugC4eVLbuxnn8YjARzPhQ0LkGsKc3l49btvffII7EnE7ja tdgz7mILWWkXYsM/UCJyaKdS5+wr7XkjS0K8bTRaK0Bpq9kWZRJOTCKvD4CqX1fCOtjo Slc2CCDFNbMRXM+zjIrb9KJg1jzRoQao04Whd2xpADOXrloFjUz19k14iXIu3uxIjnZY hZd7Lh2p17ld03AGL7jPhbTBzjmQMHW8JbMzGlkpvjLmfzOXmlb5+kpZ8RhDAJxKn6ct 2sWkUXF2FNoNrBAEnHi6EEGt2QCNXKCtMdyGfR7TOXjt/eFt7yW3OJl+lB3em8JNsZGv LBSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=NWa7fS++m02mUdorr1OZ28RtYO0ZyNnH1VedLowKjpk=; b=YKwdGgs1T0AF+A35QeKp2XHo4kHwJXCJxuogQVjWYUNDxKxocjNfGS5p1bvX6okVGB wAxX/CgRmTK+kejoJlClcRJqNjJ84gVcp0dFhwar5TK+OndV9L+i6z84BrNi9JDn12TF 2SlbU4shkJoQSbkOtR0xHjbga1/vjosUzDn02732ewp23o5ZtUFV6V7G26vTgJ9cYd/e OMVtfwVNefIyof9PKm/yUzU9WTAWM9xr5i+pDTsda/mT5xDsyTWimdYMaRvXgfgcMTCx l8ayw5zyp/+IbnyVxakrMCmPon8i62gwptvjEJwX0YaEOfeQFXZPDzz6uD33f4EhymUA YpEg== X-Gm-Message-State: AGRZ1gKGhcp2/NFvg/awmML6f91ZguLwIsMBUhFFZePXpq7VLtuyTpzu Smh9Lvwv0fi2eLc2U7NZW2Kn4mtu X-Google-Smtp-Source: AJdET5doxj4D8s2TzmznxTnlzfek7zkmnd0hZx3drKbOZVe+citbmZouKJxbMQ3GSPvxbC7+kflRNJi3 X-Received: by 2002:ac8:1b55:: with SMTP id p21mr2169782qtk.16.1541795969398; Fri, 09 Nov 2018 12:39:29 -0800 (PST) Date: Fri, 9 Nov 2018 15:39:19 -0500 Message-Id: <20181109203921.178363-1-brho@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog Subject: [PATCH 0/2] kvm: Use huge pages for DAX-backed files From: Barret Rhoden To: Dan Williams , Dave Jiang , Ross Zwisler , Vishal Verma , Paolo Bonzini , " =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= " , Thomas Gleixner , Ingo Molnar , Borislav Petkov X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, yu.c.zhang@intel.com, linux-nvdimm@lists.01.org, x86@kernel.org, linux-kernel@vger.kernel.org, "H. Peter Anvin" , yi.z.zhang@intel.com Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP This patch series depends on dax pages not being PageReserved. Once that is in place, these changes will let KVM use huge pages with dax-backed files. Without the PageReserved change, KVM and DAX still work with these patches, simply without huge pages - which is the current situation. RFC/discussion thread: https://lore.kernel.org/lkml/20181029210716.212159-1-brho@google.com/ Barret Rhoden (2): mm: make dev_pagemap_mapping_shift() externally visible kvm: Use huge pages for DAX-backed files arch/x86/kvm/mmu.c | 34 ++++++++++++++++++++++++++++++++-- include/linux/mm.h | 3 +++ mm/memory-failure.c | 38 +++----------------------------------- mm/util.c | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 37 deletions(-)