[PATCH v3 2/8] mm, devm_memremap_pages: Kill mapping "System RAM" support

2018-06-18 Thread Dan Williams
error. Cc: Christoph Hellwig Cc: "Jérôme Glisse" Cc: Logan Gunthorpe Signed-off-by: Dan Williams --- kernel/memremap.c |9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/kernel/memremap.c b/kernel/memremap.c index 4478e4688bb7..2d2c901cbe23 100644 --

[PATCH v3 0/8] mm: Rework hmm to use devm_memremap_pages and other fixes

2018-06-18 Thread Dan Williams
s() as hmm_devmem_pages_create(). Rework HMM to be a consumer of devm_memremap_pages() directly and fix up the licensing on the exports given the deep dependencies on the mm. Patches based on v4.18-rc1 where there are no upstream consumers of the HMM functionality. --- Dan Williams (8):

[PATCH v3 7/8] mm, hmm: Mark hmm_devmem_{add, add_resource} EXPORT_SYMBOL_GPL

2018-06-18 Thread Dan Williams
eviewed-by: Christoph Hellwig Signed-off-by: Dan Williams --- mm/hmm.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/hmm.c b/mm/hmm.c index b019d67a610e..481a7a5f6f46 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -1054,7 +1054,7 @@ struct hmm_devmem *hmm_devmem_add(co

[PATCH v3 3/8] mm, devm_memremap_pages: Fix shutdown handling

2018-06-18 Thread Dan Williams
Cc: Christoph Hellwig Cc: "Jérôme Glisse" Reported-by: Logan Gunthorpe Signed-off-by: Dan Williams --- drivers/dax/pmem.c| 10 ++ drivers/nvdimm/pmem.c | 18 -- include/linux/memremap.h |7 +-- kernel/memremap.c

[PATCH v3 5/8] mm, hmm: Use devm semantics for hmm_devmem_{add, remove}

2018-06-18 Thread Dan Williams
() automatically handles allocating node-local memory. Reviewed-by: Christoph Hellwig Cc: "Jérôme Glisse" Cc: Logan Gunthorpe Signed-off-by: Dan Williams --- include/linux/hmm.h |4 -- mm/hmm.c| 127 ++- 2 files changed, 25

[PATCH v3 6/8] mm, hmm: Replace hmm_devmem_pages_create() with devm_memremap_pages()

2018-06-18 Thread Dan Williams
Christoph Hellwig Cc: "Jérôme Glisse" Cc: Logan Gunthorpe Signed-off-by: Dan Williams --- mm/hmm.c | 198 -- 1 file changed, 26 insertions(+), 172 deletions(-) diff --git a/mm/hmm.c b/mm/hmm.c index d65a9419dbc2..b019d67a6

[PATCH v3 8/8] mm: Fix exports that inadvertently make put_page() EXPORT_SYMBOL_GPL

2018-06-18 Thread Dan Williams
d-by: John Hubbard Signed-off-by: Dan Williams --- kernel/memremap.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/memremap.c b/kernel/memremap.c index 16141b608b63..ecee37b44aa1 100644 --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -330,7 +330,7 @@ EXPORT_

[PATCH v3 4/8] mm, devm_memremap_pages: Add MEMORY_DEVICE_PRIVATE support

2018-06-18 Thread Dan Williams
In preparation for consolidating all ZONE_DEVICE enabling via devm_memremap_pages(), teach it how to handle the constraints of MEMORY_DEVICE_PRIVATE ranges. Cc: Christoph Hellwig Cc: "Jérôme Glisse" Reported-by: Logan Gunthorpe Reviewed-by: Logan Gunthorpe Signed-off-by: Da

[PATCH v3 1/8] mm, devm_memremap_pages: Mark devm_memremap_pages() EXPORT_SYMBOL_GPL

2018-06-18 Thread Dan Williams
page structure reference counting relative to get_user_pages() and get_user_pages_fast(). It was an oversight that this was not marked EXPORT_SYMBOL_GPL from the outset. Cc: Michal Hocko Cc: "Jérôme Glisse" Reviewed-by: Christoph Hellwig Signed-off-by: Dan Williams --- kernel/memremap

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread Dan Williams
On Tue, Jun 19, 2018 at 11:11 AM, John Hubbard wrote: > On 06/19/2018 03:41 AM, Jan Kara wrote: >> On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: >>> On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara wrote: [..] >> And then there's the aspect that both these approaches are a bit too >> heavyweig

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread Dan Williams
On Tue, Jun 19, 2018 at 6:34 PM, John Hubbard wrote: > On 06/19/2018 06:24 PM, Dan Williams wrote: >> On Tue, Jun 19, 2018 at 11:11 AM, John Hubbard wrote: >>> On 06/19/2018 03:41 AM, Jan Kara wrote: >>>> On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: >>&g

Re: [PATCH v2] async_pq: Remove VLA usage

2018-05-30 Thread Dan Williams
On Wed, May 30, 2018 at 2:33 PM, Kees Cook wrote: > On Tue, May 29, 2018 at 3:40 PM, Dan Williams > wrote: >> [ add Vinod's korg address ] >> >> On Tue, May 29, 2018 at 3:37 PM, Dan Williams >> wrote: >>> [ adding linux-raid ] >>> >>&

Re: linux-next: manual merge of the nvdimm tree with the xfs tree

2018-06-01 Thread Dan Williams
On Fri, Jun 1, 2018 at 1:58 AM, Stephen Rothwell wrote: > Hi Dan, > > Today's linux-next merge of the nvdimm tree got a conflict in: > > drivers/dax/super.c > > between commits: > > ba23cba9b3bd ("fs: allow per-device dax status checking for filesystems") > 80660f20252d ("dax: change bdev_da

Re: linux-next: manual merge of the nvdimm tree with the xfs tree

2018-06-01 Thread Dan Williams
On Fri, Jun 1, 2018 at 6:33 PM, Stephen Rothwell wrote: > Hi Darrick, > > On Fri, 1 Jun 2018 17:59:48 -0700 "Darrick J. Wong" > wrote: >> >> > + if (!dax_enabled) { >> > - pr_debug("VFS (%s): error: dax support not enabled\n", >> > - sb->s_id); >> > +

[PATCH] x86/numa_emulation: Fix uniform size build failure

2018-07-03 Thread Dan Williams
y: kbuild test robot Signed-off-by: Dan Williams --- Applies to tip/x86/cpu for 4.19. arch/x86/mm/numa_emulation.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/x86/mm/numa_emulation.c b/arch/x86/mm/numa_emulation.c index 039db00541b7..cc7523e45926 1006

Re: [PATCH 3/3] fs/dax: Assigning NULL to gfn of dax_direct_access if useless

2018-07-04 Thread Dan Williams
On Wed, Jul 4, 2018 at 7:37 AM, Dan Williams wrote: > On Wed, Jul 4, 2018 at 6:07 AM, Huaisheng Ye wrote: >> On Wed, 04 Jul 2018 19:30:12 +0800 Jan Kara wrote >> > On Wed 04-07-18 14:40:58, Huaisheng Ye wrote: >> > > From: Huaisheng Ye >> >

Re: [PATCH 3/3] kvm: add a function to check if page is from NVDIMM pmem.

2018-07-04 Thread Dan Williams
[ adding Jerome ] On Wed, Jul 4, 2018 at 8:30 AM, Zhang Yi wrote: > For device specific memory space, when we move these area of pfn to > memory zone, we will set the page reserved flag at that time, some of > these reserved for device mmio, and some of these are not, such as > NVDIMM pmem. > > N

Re: [PATCH] x86/asm/memcpy_mcsafe: Fix copy_to_user_mcsafe() exception handling

2018-07-04 Thread Dan Williams
On Wed, Jul 4, 2018 at 3:38 PM, Al Viro wrote: > On Tue, Jul 03, 2018 at 10:30:40AM +0200, Ingo Molnar wrote: >> >> * Dan Williams wrote: >> >> > Hi Ingo, >> > >> > Here is an additional copy_to_iter_mcsafe() fix to address the crash >> >

[PATCH 02/13] mm: Enable asynchronous __add_pages() and vmemmap_populate_hugepages()

2018-07-05 Thread Dan Williams
Vlastimil Babka Cc: Andrew Morton Signed-off-by: Dan Williams --- arch/ia64/mm/init.c|5 ++- arch/powerpc/mm/mem.c |5 ++- arch/s390/mm/init.c|8 +++-- arch/sh/mm/init.c |5 ++- arch/x86/mm/init_32.c |8 +++-- arch/x86/mm

[PATCH 07/13] nvdimm/pmem-dax: check the validity of the pointer pfn

2018-07-05 Thread Dan Williams
From: Huaisheng Ye direct_access needs to check the validity of pointer pfn for NULL assignment. If pfn equals to NULL, it doesn't need to calculate the value. Suggested-by: Dan Williams Signed-off-by: Huaisheng Ye Reviewed-by: Jan Kara Signed-off-by: Dan Williams --- tools/testing/n

Re: [PATCH] x86/numa_emulation: Fix uniform size build failure

2018-07-05 Thread Dan Williams
On Thu, Jul 5, 2018 at 1:24 AM, Ingo Molnar wrote: > > * Dan Williams wrote: > >> The calculation of a uniform numa-node size attempted to perform >> division with a 64-bit diviser leading to the following failure on >> 32-bit: >> >> ar

Re: [PATCH] x86/numa_emulation: Fix uniform size build failure

2018-07-06 Thread Dan Williams
On Fri, Jul 6, 2018 at 3:03 AM, Ingo Molnar wrote: > > * Dan Williams wrote: > >> > config attached. > > Doh, I intended to attach the config - attached now. > >> > These numa_emulation changes are a bit of a trainwreck - I'm removing both >> >

[PATCH v2 1/2] x86/numa_emulation: Fix emulated-to-physical node mapping

2018-07-06 Thread Dan Williams
Without this change the distance table calculation for emulated nodes may use the wrong numa node and report an incorrect distance. Cc: Wei Yang Cc: David Rientjes Cc: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Signed-off-by: Dan Williams --- arch/x86/mm/numa_e

[PATCH v2 2/2] x86/numa_emulation: Introduce uniform split capability

2018-07-06 Thread Dan Williams
20 2: 10 10 10 20 20 20 3: 20 20 20 10 10 10 4: 20 20 20 10 10 10 5: 20 20 20 10 10 10 Cc: Wei Yang Cc: David Rientjes Cc: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Signed-off-by: Dan Williams --- Documentation/x86/x86_64/boot-o

[PATCH v2 0/2] x86/numa_emulation: Introduce uniform split capability

2018-07-06 Thread Dan Williams
that has 2 physical nodes. This capability is useful for debugging and evaluating platform memory-side-cache capabilities as described by the ACPI HMAT (see 5.2.27.5 Memory Side Cache Information Structure in ACPI 6.2a) See more details in patch2. --- Dan Williams (2): x86/numa_emulation

Re: [RFC PATCH 2/2] mm/pmem: Add memblock based e820 platform driver

2018-07-06 Thread Dan Williams
On Fri, Jul 6, 2018 at 1:29 AM, Aneesh Kumar K.V wrote: > This patch steal system RAM and use that to emulate pmem device using the > e820 platform driver. > > This adds a new kernel command line 'pmemmap' which takes the format > > to allocate memory early in the boot. This memory is later regi

Re: [PATCH v3 7/8] mm, hmm: Mark hmm_devmem_{add, add_resource} EXPORT_SYMBOL_GPL

2018-07-06 Thread Dan Williams
On Mon, Jun 18, 2018 at 11:05 PM, Dan Williams wrote: > The routines hmm_devmem_add(), and hmm_devmem_add_resource() are > now wrappers around the functionality provided by devm_memremap_pages() to > inject a dev_pagemap instance and hook page-idle events. The > devm_memremap_pages()

Re: OpenAFS module libafs.ko uses GPL-only symbol '__put_devmap_managed_page'

2018-06-13 Thread Dan Williams
[ adding Andrew, Christoph, and linux-mm ] On Wed, Jun 13, 2018 at 12:33 PM, Joe Gorse wrote: > Greetings, > > Please CC answers & comments to this email. Thanks! =) > > Our build is breaking as of > commit e7638488434415aa478e78435cac8f0365737638 > Author: Dan Williams

Re: [PATCH] kernel: sys: fix potential Spectre v1

2018-05-18 Thread Dan Williams
On Fri, May 18, 2018 at 12:21 PM, Gustavo A. R. Silva wrote: > > > On 05/18/2018 02:04 PM, Gustavo A. R. Silva wrote: >> >> >> >> On 05/15/2018 05:57 PM, Dan Williams wrote: >>> >>> On Tue, May 15, 2018 at 3:29 PM, Thomas Gleixner >>&g

Re: [PATCH] kernel: sys: fix potential Spectre v1

2018-05-18 Thread Dan Williams
On Fri, May 18, 2018 at 2:27 PM, Gustavo A. R. Silva wrote: > > > On 05/18/2018 03:44 PM, Gustavo A. R. Silva wrote: > > Oops, it seems I sent the wrong patch. The function would look like this: #ifndef sanitize_index_nospec inline bool sanitize_index_nospec(u

Re: [PATCH] kernel: sys: fix potential Spectre v1

2018-05-18 Thread Dan Williams
On Fri, May 18, 2018 at 3:01 PM, Gustavo A. R. Silva wrote: > > > On 05/18/2018 04:45 PM, Dan Williams wrote: >> >> On Fri, May 18, 2018 at 2:27 PM, Gustavo A. R. Silva >> wrote: >>> >>> >>> >>> On 05/18/2018 03:44 PM, Gustavo A.

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-12 Thread Dan Williams
On Wed, Dec 12, 2018 at 7:03 AM Jerome Glisse wrote: > > On Mon, Dec 10, 2018 at 11:28:46AM +0100, Jan Kara wrote: > > On Fri 07-12-18 21:24:46, Jerome Glisse wrote: > > > Another crazy idea, why not treating GUP as another mapping of the page > > > and caller of GUP would have to provide either a

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-12 Thread Dan Williams
On Wed, Dec 12, 2018 at 9:02 AM Jerome Glisse wrote: > > On Wed, Dec 12, 2018 at 08:27:35AM -0800, Dan Williams wrote: > > On Wed, Dec 12, 2018 at 7:03 AM Jerome Glisse wrote: > > > > > > On Mon, Dec 10, 2018 at 11:28:46AM +0100, Jan Kara wrote: > > > &g

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-12 Thread Dan Williams
On Wed, Dec 12, 2018 at 1:30 PM Jerome Glisse wrote: > > On Wed, Dec 12, 2018 at 08:27:35AM -0800, Dan Williams wrote: > > On Wed, Dec 12, 2018 at 7:03 AM Jerome Glisse wrote: > > > > > > On Mon, Dec 10, 2018 at 11:28:46AM +0100, Jan Kara wrote: > > > &g

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-12 Thread Dan Williams
On Wed, Dec 12, 2018 at 3:37 PM Jason Gunthorpe wrote: > > On Wed, Dec 12, 2018 at 04:53:49PM -0500, Jerome Glisse wrote: > > > Almost, we need some safety around assuming that DMA is complete the > > > page, so the notification would need to go all to way to userspace > > > with something like a

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-12 Thread Dan Williams
On Wed, Dec 12, 2018 at 4:01 PM Jerome Glisse wrote: > > On Wed, Dec 12, 2018 at 04:37:03PM -0700, Jason Gunthorpe wrote: > > On Wed, Dec 12, 2018 at 04:53:49PM -0500, Jerome Glisse wrote: > > > > Almost, we need some safety around assuming that DMA is complete the > > > > page, so the notificatio

Re: [PATCH v3 3/3] mm/mmu_notifier: contextual information for event triggering invalidation v2

2018-12-13 Thread Dan Williams
On Thu, Dec 13, 2018 at 9:14 AM wrote: > > From: Jérôme Glisse > > CPU page table update can happens for many reasons, not only as a result > of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also > as a result of kernel activities (memory compression, reclaim, migration, > ...).

Re: [PATCH 15/52] fuse: map virtio_fs DAX window BAR

2018-12-13 Thread Dan Williams
On Mon, Dec 10, 2018 at 9:22 AM Vivek Goyal wrote: > > From: Stefan Hajnoczi > > Experimental QEMU code introduces an MMIO BAR for mapping portions of > files in the virtio-fs device. Map this BAR so that FUSE DAX can access > file contents from the host page cache. FUSE DAX sounds terrifying,

Re: [PATCH 15/52] fuse: map virtio_fs DAX window BAR

2018-12-13 Thread Dan Williams
On Thu, Dec 13, 2018 at 12:09 PM Dr. David Alan Gilbert wrote: > > * Dan Williams (dan.j.willi...@intel.com) wrote: > > On Mon, Dec 10, 2018 at 9:22 AM Vivek Goyal wrote: > > > > > > From: Stefan Hajnoczi > > > > > > Experimental QEMU cod

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-13 Thread Dan Williams
On Thu, Dec 13, 2018 at 7:53 PM John Hubbard wrote: > > On 12/12/18 4:51 PM, Dave Chinner wrote: > > On Wed, Dec 12, 2018 at 04:59:31PM -0500, Jerome Glisse wrote: > >> On Thu, Dec 13, 2018 at 08:46:41AM +1100, Dave Chinner wrote: > >>> On Wed, Dec 12, 2018 at 10:03:20AM -0500, Jerome Glisse wrote

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-17 Thread Dan Williams
On Mon, Dec 17, 2018 at 12:57 AM Jan Kara wrote: > > On Fri 14-12-18 11:38:59, Dan Williams wrote: > > On Thu, Dec 13, 2018 at 10:11 PM John Hubbard wrote: > > > > > > On 12/13/18 9:21 PM, Dan Williams wrote: > > > > On Thu, Dec 13, 20

Re: [PATCH v5 3/5] mm: Shuffle initial free memory to improve memory-side-cache utilization

2018-12-17 Thread Dan Williams
On Sun, Dec 16, 2018 at 4:43 AM Mike Rapoport wrote: > > On Fri, Dec 14, 2018 at 05:48:46PM -0800, Dan Williams wrote: > > Randomization of the page allocator improves the average utilization of > > a direct-mapped memory-side-cache. Memory side caching is a platform > > c

[PATCH v6 0/6] mm: Randomize free memory

2018-12-17 Thread Dan Williams
ntel.com/intel-optane-dc-persistent-memory-operating-modes/ [3]: https://lkml.org/lkml/2018/9/22/54 --- Dan Williams (3): mm: Shuffle initial free memory to improve memory-side-cache utilization mm: Move buddy list manipulations into helpers mm: Maintain randomization of

[PATCH v6 3/6] acpi/numa: Set the memory-side-cache size in memblocks

2018-12-17 Thread Dan Williams
Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Mike Rapoport Signed-off-by: Keith Busch Signed-off-by: Dan Williams --- arch/x86/Kconfig |1 + drivers/acpi/numa.c | 32 include/linux/memblock.h | 38 ++

[PATCH v6 5/6] mm: Move buddy list manipulations into helpers

2018-12-17 Thread Dan Williams
-by: Dan Williams --- include/linux/mm.h |3 -- include/linux/mm_types.h |3 ++ include/linux/mmzone.h | 51 ++ mm/compaction.c |4 +-- mm/page_alloc.c | 70 ++ 5 files changed, 84

[PATCH v6 6/6] mm: Maintain randomization of page free lists

2018-12-17 Thread Dan Williams
rve the initial randomness established by shuffle_free_memory() when the kernel was booted. The overhead of this manipulation is constrained by only being applied for MAX_ORDER sized pages by default. Cc: Michal Hocko Cc: Kees Cook Cc: Dave Hansen Signed-off-by: Dan Williams --- include/li

[PATCH v6 2/6] acpi: Add HMAT to generic parsing tables

2018-12-17 Thread Dan Williams
From: Keith Busch The HMAT table header has different field lengths than the existing parsing uses. Add the HMAT type to the parsing rules so it may be generically parsed. Signed-off-by: Keith Busch Signed-off-by: Dan Williams --- drivers/acpi/tables.c |9 + include/linux/acpi.h

[PATCH v6 4/6] mm: Shuffle initial free memory to improve memory-side-cache utilization

2018-12-17 Thread Dan Williams
https://lkml.org/lkml/2018/9/22/54 [3]: https://lkml.org/lkml/2018/10/12/309 Cc: Michal Hocko Cc: Kees Cook Cc: Dave Hansen Signed-off-by: Dan Williams --- include/linux/list.h| 17 include/linux/mmzone.h |4 + include/linux/shuffle.h | 47 ++ init/Kconfig

[PATCH v6 1/6] acpi: Create subtable parsing infrastructure

2018-12-17 Thread Dan Williams
table types so parsing the entries array may be more reused for all ACPI system tables so that the common code doesn't need to be duplicated. Reviewed-by: Rafael J. Wysocki Signed-off-by: Keith Busch Signed-off-by: Dan Williams --- arch/ia64/kernel/acpi.c | 12 ++--

Re: [PATCH v5 3/5] mm: Shuffle initial free memory to improve memory-side-cache utilization

2018-12-18 Thread Dan Williams
On Tue, Dec 18, 2018 at 1:11 AM Mike Rapoport wrote: > > On Mon, Dec 17, 2018 at 11:56:36AM -0800, Dan Williams wrote: > > On Sun, Dec 16, 2018 at 4:43 AM Mike Rapoport wrote: > > > > > > On Fri, Dec 14, 2018 at 05:48:46PM -0800, Dan Williams wrote: > > >

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-18 Thread Dan Williams
On Tue, Dec 18, 2018 at 7:03 PM Jason Gunthorpe wrote: > > On Wed, Dec 19, 2018 at 10:42:54AM +1100, Dave Chinner wrote: > > > Essentially, what we are talking about is how to handle broken > > hardware. I say we should just brun it with napalm and thermite > > (i.e. taint the kernel with "unsuppo

Re: [PATCH v5 0/5] mm: Randomize free memory

2018-12-19 Thread Dan Williams
On Tue, Dec 18, 2018 at 2:46 AM Rafael J. Wysocki wrote: > > On Monday, December 17, 2018 5:32:10 PM CET Dan Williams wrote: > > On Mon, Dec 17, 2018 at 2:12 AM Rafael J. Wysocki > > wrote: > > > > > > On Saturday, December 15, 2018 2:48:30 AM CET Dan Will

Re: [PATCH v6 0/6] mm: Randomize free memory

2018-12-19 Thread Dan Williams
On Wed, Dec 19, 2018 at 12:32 PM Michal Hocko wrote: > > On Mon 17-12-18 20:23:23, Dan Williams wrote: > > Andrew, this needs at least an ack from Michal, or Mel before it moves > > forward. It would be a nice surprise / present to see it move forward > > before the holida

Re: [PATCHv2 01/12] acpi: Create subtable parsing infrastructure

2018-12-19 Thread Dan Williams
On Wed, Dec 19, 2018 at 3:19 PM Schmauss, Erik wrote: > > > > > -Original Message- > > From: linux-acpi-ow...@vger.kernel.org [mailto:linux-acpi- > > ow...@vger.kernel.org] On Behalf Of Rafael J. Wysocki > > Sent: Tuesday, December 11, 2018 1:45 AM > > To: Busch, Keith > > Cc: Linux Kerne

Re: [PATCH V2 1/1] device-dax: check for vma range while dax_mmap.

2018-12-19 Thread Dan Williams
On Wed, Dec 12, 2018 at 10:12 PM Yi Zhang wrote: > > On 2018-12-10 at 16:10:31 -0800, Dan Williams wrote: > > On Tue, Aug 21, 2018 at 12:38 AM Yi Zhang > > wrote: > > > > > > On 2018-08-20 at 12:50:31 -0700, Dave Jiang wrote: > > > > > > >

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-14 Thread Dan Williams
On Thu, Dec 13, 2018 at 10:11 PM John Hubbard wrote: > > On 12/13/18 9:21 PM, Dan Williams wrote: > > On Thu, Dec 13, 2018 at 7:53 PM John Hubbard wrote: > >> > >> On 12/12/18 4:51 PM, Dave Chinner wrote: > >>> On Wed, Dec 12, 2018 at 04:59:31PM -0500,

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-14 Thread Dan Williams
On Fri, Dec 14, 2018 at 12:03 PM Matthew Wilcox wrote: > > On Fri, Dec 14, 2018 at 11:53:31AM -0800, Dave Hansen wrote: > > On 12/14/18 11:48 AM, Matthew Wilcox wrote: > > > I think we can do better than a proxy object with bit 0 set. I'd go > > > for allocating something like this: > > > > > > s

[PATCH v5 5/5] mm: Maintain randomization of page free lists

2018-12-14 Thread Dan Williams
rve the initial randomness established by shuffle_free_memory() when the kernel was booted. The overhead of this manipulation is constrained by only being applied for MAX_ORDER sized pages by default. Cc: Michal Hocko Cc: Kees Cook Cc: Dave Hansen Signed-off-by: Dan Williams --- include/linux/m

[PATCH v5 4/5] mm: Move buddy list manipulations into helpers

2018-12-14 Thread Dan Williams
-by: Dan Williams --- include/linux/mm.h |3 -- include/linux/mm_types.h |3 ++ include/linux/mmzone.h | 51 ++ mm/compaction.c |4 +-- mm/page_alloc.c | 70 ++ 5 files changed, 84

[PATCH v5 1/5] acpi: Create subtable parsing infrastructure

2018-12-14 Thread Dan Williams
table types so parsing the entries array may be more reused for all ACPI system tables so that the common code doesn't need to be duplicated. Reviewed-by: Rafael J. Wysocki Signed-off-by: Keith Busch Signed-off-by: Dan Williams --- arch/ia64/kernel/acpi.c | 12 ++--

[PATCH v5 0/5] mm: Randomize free memory

2018-12-14 Thread Dan Williams
tent-memory-operating-modes/ [3]: https://lkml.org/lkml/2018/9/22/54 --- Dan Williams (3): mm: Shuffle init

[PATCH v5 3/5] mm: Shuffle initial free memory to improve memory-side-cache utilization

2018-12-14 Thread Dan Williams
https://lkml.org/lkml/2018/9/22/54 [3]: https://lkml.org/lkml/2018/10/12/309 Cc: Michal Hocko Cc: Kees Cook Cc: Dave Hansen Signed-off-by: Dan Williams --- include/linux/list.h | 17 include/linux/mm.h | 38 + include/linux/mmzone.h |4 + init/Kconfig

[PATCH v5 2/5] acpi/numa: Set the memory-side-cache size in memblocks

2018-12-14 Thread Dan Williams
Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Mike Rapoport Signed-off-by: Keith Busch Signed-off-by: Dan Williams --- arch/x86/Kconfig |1 + drivers/acpi/numa.c | 32 include/linux/memblock.h | 36

Re: [PATCH v5 0/5] mm: Randomize free memory

2018-12-17 Thread Dan Williams
On Mon, Dec 17, 2018 at 2:12 AM Rafael J. Wysocki wrote: > > On Saturday, December 15, 2018 2:48:30 AM CET Dan Williams wrote: > > Changes since v4: [1] > > * Default the randomization to off and enable it dynamically based on > > the detection of a memory side cach

Re: [PATCH 3/7] doc/vm: New documentation for memory performance

2018-12-10 Thread Dan Williams
On Thu, Nov 15, 2018 at 4:59 AM Jonathan Cameron wrote: > > On Wed, 14 Nov 2018 15:49:16 -0700 > Keith Busch wrote: [..] > > +The kernel does not provide performance attributes for non-local memory > > +initiators. The performance characteristics the kernel provides for > > +the local initiators

Re: [driver-core PATCH v8 2/9] driver core: Establish order of operations for device_add and device_del via bitflag

2018-12-10 Thread Dan Williams
On Wed, Dec 5, 2018 at 9:25 AM Alexander Duyck wrote: > > Add an additional bit flag to the device struct named "dead". > > This additional flag provides a guarantee that when a device_del is > executed on a given interface an async worker will not attempt to attach > the driver following the earl

Re: [driver-core PATCH v8 2/9] driver core: Establish order of operations for device_add and device_del via bitflag

2018-12-10 Thread Dan Williams
On Mon, Dec 10, 2018 at 11:35 AM Alexander Duyck wrote: > > On Mon, 2018-12-10 at 10:58 -0800, Dan Williams wrote: > > On Wed, Dec 5, 2018 at 9:25 AM Alexander Duyck > > wrote: > > > > > > Add an additional bit flag to the device struct named "dead"

Re: [driver-core PATCH v8 2/9] driver core: Establish order of operations for device_add and device_del via bitflag

2018-12-10 Thread Dan Williams
On Mon, Dec 10, 2018 at 12:58 PM Alexander Duyck wrote: > > On Mon, 2018-12-10 at 11:43 -0800, Dan Williams wrote: > > On Mon, Dec 10, 2018 at 11:35 AM Alexander Duyck > > wrote: > > > > > > On Mon, 2018-12-10 at 10:58 -0800, Dan Williams wrote: > > &g

Re: [driver-core PATCH v8 2/9] driver core: Establish order of operations for device_add and device_del via bitflag

2018-12-10 Thread Dan Williams
On Mon, Dec 10, 2018 at 1:15 PM Dan Williams wrote: > > On Mon, Dec 10, 2018 at 12:58 PM Alexander Duyck > wrote: [..] > > Also the context for the two functions seems to be a bit different. In > > the case of __device_attach_driver the device_lock is already held. In &g

Re: [driver-core PATCH v8 2/9] driver core: Establish order of operations for device_add and device_del via bitflag

2018-12-10 Thread Dan Williams
On Mon, Dec 10, 2018 at 2:24 PM Alexander Duyck wrote: > > On Mon, 2018-12-10 at 13:23 -0800, Dan Williams wrote: > > On Mon, Dec 10, 2018 at 1:15 PM Dan Williams > > wrote: > > > > > > On Mon, Dec 10, 2018 at 12:58 PM Alexander Duyck > > > wrote:

Re: [PATCH V2 1/1] device-dax: check for vma range while dax_mmap.

2018-12-10 Thread Dan Williams
On Tue, Aug 21, 2018 at 12:38 AM Yi Zhang wrote: > > On 2018-08-20 at 12:50:31 -0700, Dave Jiang wrote: > > > > > > On 08/20/2018 10:53 AM, Verma, Vishal L wrote: > > > > > > On Mon, 2018-08-13 at 20:02 +0800, Zhang Yi wrote: > > >> This patch prevents a user mapping an illegal vma range that is l

Re: [PATCHv2 02/12] acpi/hmat: Parse and report heterogeneous memory

2018-12-10 Thread Dan Williams
On Mon, Dec 10, 2018 at 5:05 PM Keith Busch wrote: > > Systems may provide different memory types and export this information > in the ACPI Heterogeneous Memory Attribute Table (HMAT). Parse these > tables provided by the platform and report the memory access and caching > attributes. > > Signed-o

[PATCH] x86/mm: Fix decoy address handling vs 32-bit builds

2018-12-11 Thread Dan Williams
by: Gert Robben Cc: Cc: Andy Shevchenko Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Fixes: 510ee090abc3 ("x86/mm/pat: Prepare {reserve, free}_memtype() for...") Signed-off-by: Da

Re: [PATCHv2 02/12] acpi/hmat: Parse and report heterogeneous memory

2018-12-11 Thread Dan Williams
On Tue, Dec 11, 2018 at 8:58 AM Keith Busch wrote: > > On Mon, Dec 10, 2018 at 10:03:40PM -0800, Dan Williams wrote: > > I have a use case to detect the presence of a memory-side-cache early > > at init time [1]. To me this means that hmat_init() needs to happen as > >

Re: [PATCHv2 02/12] acpi/hmat: Parse and report heterogeneous memory

2018-12-11 Thread Dan Williams
On Tue, Dec 11, 2018 at 12:47 PM Keith Busch wrote: > > On Tue, Dec 11, 2018 at 12:29:45PM -0800, Dan Williams wrote: > > On Tue, Dec 11, 2018 at 8:58 AM Keith Busch wrote: > > > +static int __init > > > +acpi_parse_cache(union acpi_subtable_headers *header,

Re: [HMM-v25 07/19] mm/ZONE_DEVICE: new type of ZONE_DEVICE for unaddressable memory v5

2018-12-20 Thread Dan Williams
for HMM-CDM) > Changed since v3: > - fix comments that was still using UNADDRESSABLE as keyword > - kernel configuration simplification > Changed since v2: > - s/DEVICE_UNADDRESSABLE/DEVICE_PRIVATE > Changed since v1: > - rename to device private memory (from device

Re: [HMM-v25 07/19] mm/ZONE_DEVICE: new type of ZONE_DEVICE for unaddressable memory v5

2018-12-20 Thread Dan Williams
On Thu, Dec 20, 2018 at 8:15 AM Jerome Glisse wrote: [..] > > Rather than try to figure out how to forward declare pmd_t, how about > > just move dev_page_fault_t out of the generic dev_pagemap and into the > > HMM specific container structure? This should be straightfoward on top > > of the recen

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-20 Thread Dan Williams
On Thu, Dec 20, 2018 at 8:50 AM Jerome Glisse wrote: > > On Thu, Dec 20, 2018 at 02:54:49AM -0800, John Hubbard wrote: > > On 12/19/18 3:08 AM, Jan Kara wrote: > > > On Tue 18-12-18 21:07:24, Jerome Glisse wrote: > > >> On Tue, Dec 18, 2018 at 03:29:34PM -0800, John Hubbard wrote: > > >>> OK, so l

[PATCH] mm/hmm: Fix memremap.h, move dev_page_fault_t callback to hmm

2018-12-20 Thread Dan Williams
memremap.h remains generic. Fixes: 5042db43cc26 "mm/ZONE_DEVICE: new type of ZONE_DEVICE memory..." Cc: "Jérôme Glisse" Cc: Logan Gunthorpe Signed-off-by: Dan Williams --- Hi Andrew, a fairly straightfoward fix, hopefully Jérôme has time to ack it before the holidays. It has be

Re: linux-next: Tree for Dec 21 (nvdimm/security.o)

2018-12-21 Thread Dan Williams
On Fri, Dec 21, 2018 at 10:44 AM Randy Dunlap wrote: > > On 12/21/18 12:32 AM, Stephen Rothwell wrote: > > Hi all, > > > > News: there will be no linux-next release until Jan 2. Have a good break. > > > > Changes since 20181220: > > > > on x86_64: > > ld: drivers/nvdimm/security.o: in function `n

Re: linux-next: Tree for Dec 21 (nvdimm/security.o)

2018-12-21 Thread Dan Williams
On Fri, Dec 21, 2018 at 10:51 AM Dan Williams wrote: > > On Fri, Dec 21, 2018 at 10:44 AM Randy Dunlap wrote: > > > > On 12/21/18 12:32 AM, Stephen Rothwell wrote: > > > Hi all, > > > > > > News: there will be no linux-next release until Jan 2.

[4.19-stable PATCH 0/2] dax: Don't access a freed inode

2019-01-05 Thread Dan Williams
The original upstream fix, commit 55e56f06ed71 "dax: Don't access a freed inode", prompted an immediate cleanup request. Now that the cleanup has landed, commit d8a706414af4 "dax: Use non-exclusive wait in wait_entry_unlocked()", backport them both to -stable. --- Da

[4.19-stable PATCH 1/2] dax: Don't access a freed inode

2019-01-05 Thread Dan Williams
takes care not to acquire the lock or dereference the address_space in any way. Fixes: c2a7d2a11552 ("filesystem-dax: Introduce dax_lock_mapping_entry()") Cc: Signed-off-by: Matthew Wilcox Reviewed-by: Jan Kara Signed-off-by: Dan Williams ---

[4.19-stable PATCH 2/2] dax: Use non-exclusive wait in wait_entry_unlocked()

2019-01-05 Thread Dan Williams
wakeup, just switch to a non-exclusive wait. Cc: Matthew Wilcox Reported-by: Linus Torvalds Reviewed-by: Jan Kara Signed-off-by: Dan Williams --- fs/dax.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 415605fafaeb..09fa70683c41

Re: [RFC PATCH V3 0/5] Hi:

2019-01-06 Thread Dan Williams
; You mean __uaccess_begin_nospec introduced by > commit 304ec1b050310548db33063e567123fae8fd0301 > ? > > So fundamentally we do access_ok checks when supplying > the memory table to the kernel thread, and we should > do the spec barrier there. > > Then we can just cre

Re: [RFC PATCH V3 0/5] Hi:

2019-01-07 Thread Dan Williams
On Mon, Jan 7, 2019 at 6:11 AM Michael S. Tsirkin wrote: > > On Sun, Jan 06, 2019 at 11:15:20PM -0800, Dan Williams wrote: > > On Sun, Jan 6, 2019 at 8:17 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Jan 07, 2019 at 11:53:41AM +0800, Jason Wang wrote: >

Re: [RFC PATCH V3 0/5] Hi:

2019-01-07 Thread Dan Williams
On Mon, Jan 7, 2019 at 2:25 PM Michael S. Tsirkin wrote: > > On Mon, Jan 07, 2019 at 01:39:15PM -0800, Dan Williams wrote: > > On Mon, Jan 7, 2019 at 6:11 AM Michael S. Tsirkin wrote: > > > > > > On Sun, Jan 06, 2019 at 11:15:20PM -0800, Dan Williams wrote: > >

[PATCH v7 1/3] mm: Shuffle initial free memory to improve memory-side-cache utilization

2019-01-07 Thread Dan Williams
address pages and this leads to no significant impact to the cache conflict rate. [1]: https://itpeernetwork.intel.com/intel-optane-dc-persistent-memory-operating-modes/ [2]: https://lkml.org/lkml/2018/9/22/54 [3]: https://lkml.org/lkml/2018/10/12/309 Cc: Michal Hocko Cc: Kees Cook Cc: Dave Hansen Cc: Mike

[PATCH v7 0/3] mm: Randomize free memory

2019-01-07 Thread Dan Williams
om/intel-optane-dc-persistent-memory-operating-modes/ [3]: https://lkml.org/lkml/2018/9/22/54 --- Dan Williams (3): mm: Shuffle initial free memory to improve memory-side-cache utilization mm: Move buddy list manipulations into helpers mm: Maintain randomization of page free li

[PATCH v7 2/3] mm: Move buddy list manipulations into helpers

2019-01-07 Thread Dan Williams
-by: Dan Williams --- include/linux/mm.h |3 -- include/linux/mm_types.h |3 ++ include/linux/mmzone.h | 51 ++ mm/compaction.c |4 +-- mm/page_alloc.c | 70 ++ 5 files changed, 84

Re: [PATCH v7 1/3] mm: Shuffle initial free memory to improve memory-side-cache utilization

2019-01-07 Thread Dan Williams
On Mon, Jan 7, 2019 at 4:19 PM Kees Cook wrote: > > On Mon, Jan 7, 2019 at 3:33 PM Dan Williams wrote: > > > > Randomization of the page allocator improves the average utilization of > > a direct-mapped memory-side-cache. Memory side caching is a platform > >

Re: [PATCH] nfit: Hide unused functions behind CONFIG_X86

2019-01-07 Thread Dan Williams
On Mon, Jan 7, 2019 at 8:59 PM Nathan Chancellor wrote: > > On arm64 little endian allyesconfig: > > drivers/acpi/nfit/intel.c:149:12: warning: unused function > 'intel_security_unlock' [-Wunused-function] > static int intel_security_unlock(struct nvdimm *nvdimm, >^ > drivers/acpi/nfi

Re: [RFC][PATCH v2 01/21] e820: cheat PMEM as DRAM

2018-12-26 Thread Dan Williams
On Wed, Dec 26, 2018 at 8:11 PM Fengguang Wu wrote: > > On Wed, Dec 26, 2018 at 07:41:41PM -0800, Matthew Wilcox wrote: > >On Wed, Dec 26, 2018 at 09:14:47PM +0800, Fengguang Wu wrote: > >> From: Fan Du > >> > >> This is a hack to enumerate PMEM as NUMA nodes. > >> It's necessary for current BIOS

Re: [GIT PULL] libnvdimm for 4.21

2018-12-29 Thread Dan Williams
On Sat, Dec 29, 2018 at 7:36 AM Konstantin Ryabitsev wrote: > > On Fri, Dec 28, 2018 at 09:57:28PM -0800, Linus Torvalds wrote: > > Hmm. > > > > This pull request doesn't seem to have gotten an automatic pr-tracker > > reply, even though I pulled it, and even though it was cc'd to lkml. > > > > Ko

[resend PATCH] MAINTAINERS: Clarify UIO vs UACCESS maintainer

2018-10-08 Thread Dan Williams
-Hartman Acked-by: Greg Kroah-Hartman Signed-off-by: Dan Williams --- I got a bounce last time I tried to send this, hopefully the situation has improved now. Al, let me know if you want this entry. Alternatively we can just do the UIO file mask fixup by itself. MAINTAINERS |8 +++- 1 file

Re: [PATCH v2 0/3] Randomize free memory

2018-10-09 Thread Dan Williams
On Tue, Oct 9, 2018 at 4:28 AM Michal Hocko wrote: > > On Thu 04-10-18 09:44:35, Dan Williams wrote: > > Hi Michal, > > > > On Thu, Oct 4, 2018 at 12:53 AM Michal Hocko wrote: > > > > > > On Wed 03-10-18 19:15:18, Dan Williams wrote: > > > >

Re: [PATCH v2 1/3] mm: Shuffle initial free memory

2018-10-09 Thread Dan Williams
On Tue, Oct 9, 2018 at 4:16 AM Michal Hocko wrote: > > On Thu 04-10-18 09:51:37, Dan Williams wrote: > > On Thu, Oct 4, 2018 at 12:48 AM Michal Hocko wrote: [..] > > So the reason front-back randomization is not enough is due to the > > in-order initial freeing of pag

Re: [PATCH v5 4/4] mm: Defer ZONE_DEVICE page initialization to the point where we init pgmap

2018-10-09 Thread Dan Williams
On Tue, Oct 9, 2018 at 1:34 PM Alexander Duyck wrote: > > On 10/9/2018 11:04 AM, Dan Williams wrote: > > On Tue, Oct 9, 2018 at 3:21 AM Yi Zhang wrote: [..] > > That comment is incorrect, device-pages are never onlined. So I think > > we can just skip that call to __SetP

[PATCH v3 1/3] mm: Shuffle initial free memory

2018-10-09 Thread Dan Williams
together, page2 is still near page1 and has a high chance of being adjacent. As more pages are added ordering diversity improves, but there is still high page locality for the low address pages and this leads to no significant impact to the cache conflict rate. Cc: Michal Hocko Cc: Kees Cook Cc:

[PATCH v3 3/3] mm: Maintain randomization of page free lists

2018-10-09 Thread Dan Williams
rve the initial randomness established by shuffle_free_memory() when the kernel was booted. The overhead of this manipulation is constrained by only being applied for MAX_ORDER sized pages by default. Cc: Michal Hocko Cc: Kees Cook Cc: Dave Hansen Signed-off-by: Dan Williams --- include/li

<    5   6   7   8   9   10   11   12   13   14   >