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: 10676553 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 90E1513B0 for ; Fri, 9 Nov 2018 20:39:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8083F2BB32 for ; Fri, 9 Nov 2018 20:39:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F4082F214; Fri, 9 Nov 2018 20:39:32 +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=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 228B42BB32 for ; Fri, 9 Nov 2018 20:39:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728344AbeKJGVn (ORCPT ); Sat, 10 Nov 2018 01:21:43 -0500 Received: from mail-qk1-f202.google.com ([209.85.222.202]:38828 "EHLO mail-qk1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728238AbeKJGVn (ORCPT ); Sat, 10 Nov 2018 01:21:43 -0500 Received: by mail-qk1-f202.google.com with SMTP id l7-v6so5897650qkd.5 for ; Fri, 09 Nov 2018 12:39:29 -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=QAzrOjuBj6n2OdR75ArcflRDMBwrWGs4C1LO/+XJBjAb24gU4Y+JN7Kv9ZMgrnCMHs Y9XEubKOZ6zzluG8ZivE2iHfpfqEur39Vn1NPC4mq9P9hYWHIBYnVv7wb7s2SL5zyHh7 Q5i7HfaIac/2kLuX9U24tksNxIABUlOVuB0bXFhRbaD/bv9xPCbp5x2laO6pAfvqEXqc GzMIck5ZSWXzqYu8+snE2UJe/EcLXjXHLSj465nQFzY8x1pLV/eiIu+NpcIs19X3xkDZ Il4rZxuheEOMLDHQ5rsRkYTBJTLhTpwTwddJdqwcoJE1RITHEnIs+e0mHSKBhbWmQG24 1BxA== X-Gm-Message-State: AGRZ1gJyypgEm6K3zCpIWSw82DLiLBiOGpgwdOYNAqXVRJYmVMtbjxuZ Dcs5sQXWfMoQPLvHFyz+7Ce1C5XO 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 Cc: linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, yu.c.zhang@intel.com, yi.z.zhang@intel.com Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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(-)