From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965393AbcKOAZc (ORCPT ); Mon, 14 Nov 2016 19:25:32 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:60344 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933642AbcKOAZb (ORCPT ); Mon, 14 Nov 2016 19:25:31 -0500 Date: Mon, 14 Nov 2016 16:25:29 -0800 From: Andrew Morton To: Dan Williams 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" 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; _