From patchwork Tue Nov 15 00:25:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 9428693 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 47B2960471 for ; Tue, 15 Nov 2016 00:25:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40A2328A49 for ; Tue, 15 Nov 2016 00:25:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 350DA28AF2; Tue, 15 Nov 2016 00:25: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=-1.9 required=2.0 tests=BAYES_00, 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 D407B28A49 for ; Tue, 15 Nov 2016 00:25:31 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EF2FA81E31; Mon, 14 Nov 2016 16:25:26 -0800 (PST) X-Original-To: linux-nvdimm@ml01.01.org Delivered-To: linux-nvdimm@ml01.01.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CBFA881E30 for ; Mon, 14 Nov 2016 16:25:25 -0800 (PST) Received: from akpm3.mtv.corp.google.com (unknown [104.132.1.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 183FEBC0; Tue, 15 Nov 2016 00:25:30 +0000 (UTC) Date: Mon, 14 Nov 2016 16:25:29 -0800 From: Andrew Morton To: Dan Williams Subject: Re: [PATCH] mm: disable numa migration faults for dax vmas Message-Id: <20161114162529.1a5b08ff90f6f199c1be8cc9@linux-foundation.org> In-Reply-To: <147892450132.22062.16875659431109209179.stgit@dwillia2-desk3.amr.corp.intel.com> References: <147892450132.22062.16875659431109209179.stgit@dwillia2-desk3.amr.corp.intel.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Hocko , linux-nvdimm@ml01.01.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, "Kirill A. Shutemov" , Vlastimil Babka , "Aneesh Kumar K.V" Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP On Fri, 11 Nov 2016 20:21:41 -0800 Dan Williams wrote: > Mark dax vmas as not migratable to exclude them from task_numa_work(). > This is especially relevant for device-dax which wants to ensure > predictable access latency and not incur periodic faults. > > ... > > @@ -177,6 +178,9 @@ static inline bool vma_migratable(struct vm_area_struct *vma) > if (vma->vm_flags & (VM_IO | VM_PFNMAP)) > return false; > > + if (vma_is_dax(vma)) > + return false; > + > #ifndef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION > if (vma->vm_flags & VM_HUGETLB) > return false; I don't think the reader could figure out why this code is here, so... this? --- a/include/linux/mempolicy.h~mm-disable-numa-migration-faults-for-dax-vmas-fix +++ a/include/linux/mempolicy.h @@ -180,6 +180,10 @@ static inline bool vma_migratable(struct if (vma->vm_flags & (VM_IO | VM_PFNMAP)) return false; + /* + * DAX device mappings require predictable access latency, so avoid + * incurring periodic faults. + */ if (vma_is_dax(vma)) return false;