From: Matthew Wilcox <mawilcox@microsoft.com> To: Dan Williams <dan.j.williams@intel.com>, "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org> Cc: Toshi Kani <toshi.kani@hpe.com>, Nilesh Choudhury <nilesh.choudhury@oracle.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "stable@vger.kernel.org" <stable@vger.kernel.org>, "linux-mm@kvack.org" <linux-mm@kvack.org>, "akpm@linux-foundation.org" <akpm@linux-foundation.org>, Ross Zwisler <ross.zwisler@linux.intel.com>, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, Kai Zhang <kai.ka.zhang@oracle.com> Subject: RE: [PATCH 4/5] mm: fix cache mode of dax pmd mappings Date: Tue, 6 Sep 2016 17:20:47 +0000 [thread overview] Message-ID: <DM2PR21MB00892878E2A17E076A18C795CBF90@DM2PR21MB0089.namprd21.prod.outlook.com> (raw) In-Reply-To: <147318058165.30325.16762406881120129093.stgit@dwillia2-desk3.amr.corp.intel.com> I have no objection to this patch going in for now. Longer term, surely we want to track what mode the PFNs are mapped in? There are various bizarre suppositions out there about how persistent memory should be mapped, and it's probably better if the kernel ignores what the user specifies and keeps everything sane. I've read the dire warnings in the Intel architecture manual and I have no desire to deal with the inevitable bug reports on some hardware I don't own and requires twenty weeks of operation in order to observe the bug. -----Original Message----- From: Dan Williams [mailto:dan.j.williams@intel.com] Sent: Tuesday, September 6, 2016 12:50 PM To: linux-nvdimm@lists.01.org Cc: Toshi Kani <toshi.kani@hpe.com>; Matthew Wilcox <mawilcox@microsoft.com>; Nilesh Choudhury <nilesh.choudhury@oracle.com>; linux-kernel@vger.kernel.org; stable@vger.kernel.org; linux-mm@kvack.org; akpm@linux-foundation.org; Ross Zwisler <ross.zwisler@linux.intel.com>; Kirill A. Shutemov <kirill.shutemov@linux.intel.com>; Kai Zhang <kai.ka.zhang@oracle.com> Subject: [PATCH 4/5] mm: fix cache mode of dax pmd mappings track_pfn_insert() is marking dax mappings as uncacheable. It is used to keep mappings attributes consistent across a remapped range. However, since dax regions are never registered via track_pfn_remap(), the caching mode lookup for dax pfns always returns _PAGE_CACHE_MODE_UC. We do not use track_pfn_insert() in the dax-pte path, and we always want to use the pgprot of the vma itself, so drop this call. Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Matthew Wilcox <mawilcox@microsoft.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Nilesh Choudhury <nilesh.choudhury@oracle.com> Reported-by: Kai Zhang <kai.ka.zhang@oracle.com> Reported-by: Toshi Kani <toshi.kani@hpe.com> Cc: <stable@vger.kernel.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- mm/huge_memory.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index a6abd76baa72..338eff05c77a 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -676,8 +676,6 @@ int vmf_insert_pfn_pmd(struct vm_area_struct *vma, unsigned long addr, if (addr < vma->vm_start || addr >= vma->vm_end) return VM_FAULT_SIGBUS; - if (track_pfn_insert(vma, &pgprot, pfn)) - return VM_FAULT_SIGBUS; insert_pfn_pmd(vma, addr, pmd, pfn, pgprot, write); return VM_FAULT_NOPAGE; }
WARNING: multiple messages have this Message-ID (diff)
From: Matthew Wilcox <mawilcox@microsoft.com> To: Dan Williams <dan.j.williams@intel.com>, "linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org> Cc: Toshi Kani <toshi.kani@hpe.com>, Nilesh Choudhury <nilesh.choudhury@oracle.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "stable@vger.kernel.org" <stable@vger.kernel.org>, "linux-mm@kvack.org" <linux-mm@kvack.org>, "akpm@linux-foundation.org" <akpm@linux-foundation.org>, Ross Zwisler <ross.zwisler@linux.intel.com>, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, Kai Zhang <kai.ka.zhang@oracle.com> Subject: RE: [PATCH 4/5] mm: fix cache mode of dax pmd mappings Date: Tue, 6 Sep 2016 17:20:47 +0000 [thread overview] Message-ID: <DM2PR21MB00892878E2A17E076A18C795CBF90@DM2PR21MB0089.namprd21.prod.outlook.com> (raw) In-Reply-To: <147318058165.30325.16762406881120129093.stgit@dwillia2-desk3.amr.corp.intel.com> I have no objection to this patch going in for now. Longer term, surely we want to track what mode the PFNs are mapped in? There are various bizarre suppositions out there about how persistent memory should be mapped, and it's probably better if the kernel ignores what the user specifies and keeps everything sane. I've read the dire warnings in the Intel architecture manual and I have no desire to deal with the inevitable bug reports on some hardware I don't own and requires twenty weeks of operation in order to observe the bug. -----Original Message----- From: Dan Williams [mailto:dan.j.williams@intel.com] Sent: Tuesday, September 6, 2016 12:50 PM To: linux-nvdimm@lists.01.org Cc: Toshi Kani <toshi.kani@hpe.com>; Matthew Wilcox <mawilcox@microsoft.com>; Nilesh Choudhury <nilesh.choudhury@oracle.com>; linux-kernel@vger.kernel.org; stable@vger.kernel.org; linux-mm@kvack.org; akpm@linux-foundation.org; Ross Zwisler <ross.zwisler@linux.intel.com>; Kirill A. Shutemov <kirill.shutemov@linux.intel.com>; Kai Zhang <kai.ka.zhang@oracle.com> Subject: [PATCH 4/5] mm: fix cache mode of dax pmd mappings track_pfn_insert() is marking dax mappings as uncacheable. It is used to keep mappings attributes consistent across a remapped range. However, since dax regions are never registered via track_pfn_remap(), the caching mode lookup for dax pfns always returns _PAGE_CACHE_MODE_UC. We do not use track_pfn_insert() in the dax-pte path, and we always want to use the pgprot of the vma itself, so drop this call. Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Matthew Wilcox <mawilcox@microsoft.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Nilesh Choudhury <nilesh.choudhury@oracle.com> Reported-by: Kai Zhang <kai.ka.zhang@oracle.com> Reported-by: Toshi Kani <toshi.kani@hpe.com> Cc: <stable@vger.kernel.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- mm/huge_memory.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index a6abd76baa72..338eff05c77a 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -676,8 +676,6 @@ int vmf_insert_pfn_pmd(struct vm_area_struct *vma, unsigned long addr, if (addr < vma->vm_start || addr >= vma->vm_end) return VM_FAULT_SIGBUS; - if (track_pfn_insert(vma, &pgprot, pfn)) - return VM_FAULT_SIGBUS; insert_pfn_pmd(vma, addr, pmd, pfn, pgprot, write); return VM_FAULT_NOPAGE; }
next prev parent reply other threads:[~2016-09-06 17:20 UTC|newest] Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-09-06 16:49 [PATCH 0/5] device-dax and huge-page dax fixes for 4.8-rc6 Dan Williams 2016-09-06 16:49 ` Dan Williams 2016-09-06 16:49 ` Dan Williams 2016-09-06 16:49 ` [PATCH 1/5] dax: fix mapping size check Dan Williams 2016-09-06 16:49 ` Dan Williams 2016-09-06 16:49 ` Dan Williams 2016-09-06 16:49 ` [PATCH 2/5] dax: fix offset to physical address translation Dan Williams 2016-09-06 16:49 ` Dan Williams 2016-09-06 16:49 ` Dan Williams 2016-09-06 16:49 ` Dan Williams 2016-09-10 1:00 ` Dan Williams 2016-09-10 1:00 ` Dan Williams 2016-09-10 1:00 ` Dan Williams 2016-09-06 16:49 ` [PATCH 3/5] mm: fix show_smap() for zone_device-pmd ranges Dan Williams 2016-09-06 16:49 ` Dan Williams 2016-09-06 16:49 ` Dan Williams 2016-09-06 20:16 ` Andrew Morton 2016-09-06 20:16 ` Andrew Morton 2016-09-06 16:49 ` [PATCH 4/5] mm: fix cache mode of dax pmd mappings Dan Williams 2016-09-06 16:49 ` Dan Williams 2016-09-06 16:49 ` Dan Williams 2016-09-06 16:49 ` Dan Williams 2016-09-06 17:20 ` Matthew Wilcox [this message] 2016-09-06 17:20 ` Matthew Wilcox 2016-09-06 17:32 ` Dan Williams 2016-09-06 17:32 ` Dan Williams 2016-09-06 17:32 ` Dan Williams [not found] ` <147318058165.30325.16762406881120129093.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 2016-09-06 20:17 ` Andrew Morton 2016-09-06 20:17 ` Andrew Morton 2016-09-06 20:17 ` Andrew Morton [not found] ` <20160906131756.6b6c6315b7dfba3a9d5f233a-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> 2016-09-06 21:52 ` Dan Williams 2016-09-06 21:52 ` Dan Williams 2016-09-06 21:52 ` Dan Williams [not found] ` <CAPcyv4hjdPWxdY+UTKVstiLZ7r4oOCa+h+Hd+kzS+wJZidzCjA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-09-07 19:39 ` Kani, Toshimitsu 2016-09-07 19:39 ` Kani, Toshimitsu [not found] ` <1473277101.2092.39.camel-ZPxbGqLxI0U@public.gmane.org> 2016-09-07 19:45 ` Dan Williams 2016-09-07 19:45 ` Dan Williams 2016-09-07 19:45 ` Dan Williams 2016-09-06 16:49 ` [PATCH 5/5] mm: cleanup pfn_t usage in track_pfn_insert() Dan Williams 2016-09-06 16:49 ` Dan Williams 2016-09-06 16:49 ` Dan Williams [not found] ` <147318058712.30325.12749411762275637099.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 2016-09-06 20:20 ` Andrew Morton 2016-09-06 20:20 ` Andrew Morton 2016-09-06 20:20 ` Andrew Morton [not found] ` <20160906132001.cd465767fa9844ddeb630cc4-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> 2016-09-06 20:30 ` Dan Williams 2016-09-06 20:30 ` Dan Williams 2016-09-06 20:30 ` Dan Williams 2016-09-07 5:12 ` Anshuman Khandual 2016-09-07 5:12 ` Anshuman Khandual 2016-09-07 5:12 ` Anshuman Khandual 2016-09-07 15:47 ` Dan Williams 2016-09-07 15:47 ` Dan Williams 2016-09-07 15:47 ` Dan Williams
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=DM2PR21MB00892878E2A17E076A18C795CBF90@DM2PR21MB0089.namprd21.prod.outlook.com \ --to=mawilcox@microsoft.com \ --cc=akpm@linux-foundation.org \ --cc=dan.j.williams@intel.com \ --cc=kai.ka.zhang@oracle.com \ --cc=kirill.shutemov@linux.intel.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=linux-nvdimm@lists.01.org \ --cc=nilesh.choudhury@oracle.com \ --cc=ross.zwisler@linux.intel.com \ --cc=stable@vger.kernel.org \ --cc=toshi.kani@hpe.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.