Re: [PATCH 2/2] devm-helpers: Add resource managed version of debugfs directory create function

2024-02-22 Thread Dan Williams
Dan Williams wrote: > Dave Jiang wrote: > > > > > > On 2/22/24 7:58 AM, Marek Behún wrote: > > > A few drivers register a devm action to remove a debugfs directory, > > > implementing a one-liner function that calls debufs_remove_recursive().

Re: [PATCH 2/2] devm-helpers: Add resource managed version of debugfs directory create function

2024-02-22 Thread Dan Williams
Dave Jiang wrote: > > > On 2/22/24 7:58 AM, Marek Behún wrote: > > A few drivers register a devm action to remove a debugfs directory, > > implementing a one-liner function that calls debufs_remove_recursive(). > > Help drivers avoid this repeated implementations by adding managed > > version of

Re: [Lsf-pc] [LSF/MM/BPF proposal]: Physr discussion

2023-01-23 Thread Dan Williams
Matthew Wilcox wrote: > On Mon, Jan 23, 2023 at 11:36:51AM -0800, Dan Williams wrote: > > Jason Gunthorpe via Lsf-pc wrote: > > > I would like to have a session at LSF to talk about Matthew's > > > physr discussion starter: > > > > > > h

RE: [Lsf-pc] [LSF/MM/BPF proposal]: Physr discussion

2023-01-23 Thread Dan Williams
Jason Gunthorpe via Lsf-pc wrote: > I would like to have a session at LSF to talk about Matthew's > physr discussion starter: > > https://lore.kernel.org/linux-mm/ydykweu0htv8m...@casper.infradead.org/ > > I have become interested in this with some immediacy because of > IOMMUFD and this other

Re: [PATCH] mm/memremap: Introduce pgmap_request_folio() using pgmap offsets

2022-11-30 Thread Dan Williams
Jason Gunthorpe wrote: > On Thu, Oct 20, 2022 at 02:56:39PM -0700, Dan Williams wrote: > > A 'struct dev_pagemap' (pgmap) represents a collection of ZONE_DEVICE > > pages. The pgmap is a reference counted object that serves a similar > > role as a 'struct request_qu

Re: [PATCH] mm/memremap: Introduce pgmap_request_folio() using pgmap offsets

2022-10-20 Thread Dan Williams
Felix Kuehling wrote: > Am 2022-10-20 um 17:56 schrieb Dan Williams: > > A 'struct dev_pagemap' (pgmap) represents a collection of ZONE_DEVICE > > pages. The pgmap is a reference counted object that serves a similar > > role as a 'struct request_queue'. Live references

[PATCH] mm/memremap: Introduce pgmap_request_folio() using pgmap offsets

2022-10-20 Thread Dan Williams
John Hubbard Cc: Alistair Popple Cc: Felix Kuehling Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Ben Skeggs Cc: Karol Herbst Cc: Lyude Paul Cc: "Jérôme Glisse" Suggested-by: Jason Gunthorpe Signed-of

Re: [PATCH 2/7] mm: Free device private pages have zero refcount

2022-09-29 Thread Dan Williams
Alistair Popple wrote: > > Dan Williams writes: > > > Alistair Popple wrote: > >> > >> Jason Gunthorpe writes: > >> > >> > On Mon, Sep 26, 2022 at 04:03:06PM +1000, Alistair Popple wrote: > >> >> Since 27674ef6c73f (&q

Re: [PATCH 2/7] mm: Free device private pages have zero refcount

2022-09-29 Thread Dan Williams
Alistair Popple wrote: > > Jason Gunthorpe writes: > > > On Mon, Sep 26, 2022 at 04:03:06PM +1000, Alistair Popple wrote: > >> Since 27674ef6c73f ("mm: remove the extra ZONE_DEVICE struct page > >> refcount") device private pages have no longer had an extra reference > >> count when the page is

Re: [PATCH v2 4/4] vfio/pci: Allow MMIO regions to be exported through dma-buf

2022-09-07 Thread Dan Williams
Christoph Hellwig wrote: > On Wed, Sep 07, 2022 at 09:33:11AM -0300, Jason Gunthorpe wrote: > > Yes, you said that, and I said that when the AMD driver first merged > > it - but it went in anyhow and now people are using it in a bunch of > > places. > > drm folks made up their own weird rules, if

RE: [PATCH v2 16/28] resource: Introduce alloc_free_mem_region()

2022-07-21 Thread Dan Williams
[ add dri-devel and nouveau ] Dan Williams wrote: > The core of devm_request_free_mem_region() is a helper that searches for > free space in iomem_resource and performs __request_region_locked() on > the result of that search. The policy choices of the implementation > con

RE: [PATCH][next] treewide: uapi: Replace zero-length arrays with flexible-array members

2022-06-27 Thread Dan Williams
P/linux/issues/78 > Build-tested-by: > https://lore.kernel.org/lkml/62b675ec.wkx6aoz6cbe71vtf%25...@intel.com/ > Signed-off-by: Gustavo A. R. Silva > --- > Hi all! > > JFYI: I'm adding this to my -next tree. :) > [..] > include/uapi/linux/ndctl.h| 10 +-- For ndctl.h Acked-by: Dan Williams

Re: [PATCH 7/8] mm: remove the extra ZONE_DEVICE struct page refcount

2022-02-08 Thread Dan Williams
ge cache. This looks ok to me, and passes my tests. So given I'm still working my way back to fixing the references properly I'm ok for this hack to replace the more broken hack that is there presently. Reviewed-by: Dan Williams

Re: [PATCH 6/8] mm: don't include in

2022-02-08 Thread Dan Williams
On Mon, Feb 7, 2022 at 3:49 PM Dan Williams wrote: > > On Sun, Feb 6, 2022 at 10:33 PM Christoph Hellwig wrote: > > > > Move the check for the actual pgmap types that need the free at refcount > > one behavior into the out of line helper, and thus avoid the need to >

Re: [PATCH 6/8] mm: don't include in

2022-02-07 Thread Dan Williams
e. Reviewed-by: Dan Williams > > Signed-off-by: Christoph Hellwig > --- > arch/arm64/mm/mmu.c| 1 + > drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + > drivers/gpu/drm/drm_cache.c| 2 +- > drivers/gpu/drm/nouveau/nouveau_dmem.c | 1 + > d

Re: [PATCH 5/8] mm: simplify freeing of devmap managed pages

2022-02-07 Thread Dan Williams
On Sun, Feb 6, 2022 at 10:33 PM Christoph Hellwig wrote: > > Make put_devmap_managed_page return if it took charge of the page > or not and remove the separate page_is_devmap_managed helper. Looks good to me: Reviewed-by: Dan Williams

Re: [PATCH 4/8] mm: move free_devmap_managed_page to memremap.c

2022-02-07 Thread Dan Williams
On Sun, Feb 6, 2022 at 10:33 PM Christoph Hellwig wrote: > > free_devmap_managed_page has nothing to do with the code in swap.c, > move it to live with the rest of the code for devmap handling. > Looks good. Reviewed-by: Dan Williams

Re: [PATCH 2/8] mm: remove the __KERNEL__ guard from

2022-02-07 Thread Dan Williams
On Sun, Feb 6, 2022 at 10:33 PM Christoph Hellwig wrote: > > __KERNEL__ ifdefs don't make sense outside of include/uapi/. Yes. Reviewed-by: Dan Williams

Re: [PATCH 1/8] mm: remove a pointless CONFIG_ZONE_DEVICE check in memremap_pages

2022-02-07 Thread Dan Williams
On Sun, Feb 6, 2022 at 10:33 PM Christoph Hellwig wrote: > > memremap.c is only built when CONFIG_ZONE_DEVICE is set, so remove > the superflous extra check. Looks good to me. Reviewed-by: Dan Williams

Re: [PATCH v1 2/2] mm: remove extra ZONE_DEVICE struct page refcount

2021-10-20 Thread Dan Williams
On Wed, Oct 20, 2021 at 10:09 AM Joao Martins wrote: > > On 10/19/21 20:21, Dan Williams wrote: > > On Tue, Oct 19, 2021 at 9:02 AM Jason Gunthorpe wrote: > >> > >> On Tue, Oct 19, 2021 at 04:13:34PM +0100, Joao Martins wrote: > >>> On 10/19/21 00:06, Ja

Re: [PATCH v1 2/2] mm: remove extra ZONE_DEVICE struct page refcount

2021-10-19 Thread Dan Williams
On Tue, Oct 19, 2021 at 9:02 AM Jason Gunthorpe wrote: > > On Tue, Oct 19, 2021 at 04:13:34PM +0100, Joao Martins wrote: > > On 10/19/21 00:06, Jason Gunthorpe wrote: > > > On Mon, Oct 18, 2021 at 12:37:30PM -0700, Dan Williams wrote: > > > > > >

Re: [PATCH v1 2/2] mm: remove extra ZONE_DEVICE struct page refcount

2021-10-18 Thread Dan Williams
On Mon, Oct 18, 2021 at 11:26 AM Jason Gunthorpe wrote: > > On Sun, Oct 17, 2021 at 11:35:35AM -0700, Dan Williams wrote: > > > > DAX is stuffing arrays of 4k pages into the PUD/PMDs. Aligning with > > > THP would make using normal refconting much simpler. I looked at

Re: [PATCH v1 2/2] mm: remove extra ZONE_DEVICE struct page refcount

2021-10-17 Thread Dan Williams
On Sat, Oct 16, 2021 at 8:45 AM Jason Gunthorpe wrote: > > On Thu, Oct 14, 2021 at 06:37:35PM -0700, Dan Williams wrote: > > On Thu, Oct 14, 2021 at 4:06 PM Jason Gunthorpe wrote: > > > > > > On Thu, Oct 14, 2021 at 12:01:14PM -0700, Dan Williams wrote: > >

Re: [PATCH v1 2/2] mm: remove extra ZONE_DEVICE struct page refcount

2021-10-17 Thread Dan Williams
On Sat, Oct 16, 2021 at 9:39 AM Matthew Wilcox wrote: > > On Sat, Oct 16, 2021 at 12:44:50PM -0300, Jason Gunthorpe wrote: > > Assuming changing FSDAX is hard.. How would DAX people feel about just > > deleting the PUD/PMD support until it can be done with compound pages? > > I think there are

Re: [PATCH v1 2/2] mm: remove extra ZONE_DEVICE struct page refcount

2021-10-14 Thread Dan Williams
On Thu, Oct 14, 2021 at 4:06 PM Jason Gunthorpe wrote: > > On Thu, Oct 14, 2021 at 12:01:14PM -0700, Dan Williams wrote: > > > > Does anyone know why devmap is pte_special anyhow? > > > > It does not need to be special as mentioned here: > > > > http

Re: [PATCH v1 2/2] mm: remove extra ZONE_DEVICE struct page refcount

2021-10-14 Thread Dan Williams
On Thu, Oct 14, 2021 at 11:45 AM Matthew Wilcox wrote: > > > It would probably help if you cc'd Dan on this. Thanks. [..] > > On Thu, Oct 14, 2021 at 02:06:34PM -0300, Jason Gunthorpe wrote: > > On Thu, Oct 14, 2021 at 10:39:28AM -0500, Alex Sierra wrote: > > > From: Ralph Campbell > > > > > >

Re: [PATCH v1 03/14] mm: add iomem vma selection for memory migration

2021-09-02 Thread Dan Williams
On Thu, Sep 2, 2021 at 1:18 AM Christoph Hellwig wrote: > > On Wed, Sep 01, 2021 at 11:40:43AM -0400, Felix Kuehling wrote: > > >>> It looks like I'm totally misunderstanding what you are adding here > > >>> then. Why do we need any special treatment at all for memory that > > >>> has normal

Re: [PATCH v2 06/63] cxl/core: Replace unions with struct_group()

2021-08-18 Thread Dan Williams
nel.org > Suggested-by: Dan Williams Looks good and tests ok here: Reviewed-by: Dan Williams

Re: [PATCH v2 05/63] stddef: Introduce struct_group() helper macro

2021-08-18 Thread Dan Williams
UAPI uses too, the underlying > __struct_group() macro has been defined in UAPI so it can be used there > too. > > Co-developed-by: Keith Packard > Signed-off-by: Keith Packard > Signed-off-by: Kees Cook > Acked-by: Gustavo A. R. Silva > Link: https://lore.kernel.org/lkml/20210728023217.GC35706@embeddedor > Enhanced-by: Rasmus Villemoes > Link: > https://lore.kernel.org/lkml/41183a98-bdb9-4ad6-7eab-5a7292a6d...@rasmusvillemoes.dk > Enhanced-by: Dan Williams Acked-by: Dan Williams

Re: [PATCH v5 11/15] PCI: Obey iomem restrictions for procfs mmap

2020-11-04 Thread Dan Williams
On Wed, Nov 4, 2020 at 8:50 AM Bjorn Helgaas wrote: > > On Wed, Nov 04, 2020 at 09:44:04AM +0100, Daniel Vetter wrote: > > On Tue, Nov 3, 2020 at 11:09 PM Dan Williams > > wrote: > > > On Tue, Nov 3, 2020 at 1:28 PM Bjorn Helgaas wrote: > > > > On Fri, O

Re: [PATCH v5 11/15] PCI: Obey iomem restrictions for procfs mmap

2020-11-03 Thread Dan Williams
On Tue, Nov 3, 2020 at 1:28 PM Bjorn Helgaas wrote: > > On Fri, Oct 30, 2020 at 11:08:11AM +0100, Daniel Vetter wrote: > > There's three ways to access PCI BARs from userspace: /dev/mem, sysfs > > files, and the old proc interface. Two check against > > iomem_is_exclusive, proc never did. And

Re: [PATCH v5 15/15] PCI: Revoke mappings like devmem

2020-10-30 Thread Dan Williams
fore not a problem. > > The only difference in access checks left is that sysfs PCI mmap does > not check for CAP_RAWIO. I'm not really sure whether that should be > added or not. > > Signed-off-by: Daniel Vetter > Cc: Jason Gunthorpe > Cc: Kees Cook > Cc: Dan Wi

Re: [PATCH v3 14/16] resource: Move devmem revoke code to resource framework

2020-10-21 Thread Dan Williams
revoke mappings. > > To prepare for this, move the code from the /dev/kmem driver to > kernel/resource.c. > > Reviewed-by: Greg Kroah-Hartman > Signed-off-by: Daniel Vetter > Cc: Jason Gunthorpe > Cc: Kees Cook > Cc: Dan Williams > Cc: Andrew Morton > Cc: John Hubbard

Re: [PATCH v3 13/16] /dev/mem: Only set filp->f_mapping

2020-10-21 Thread Dan Williams
> > Signed-off-by: Daniel Vetter > Cc: Jason Gunthorpe > Cc: Kees Cook > Cc: Dan Williams > Cc: Andrew Morton > Cc: John Hubbard > Cc: Jérôme Glisse > Cc: Jan Kara > Cc: Dan Williams Reviewed-by: Dan Williams _

Re: [RFC] treewide: cleanup unreachable breaks

2020-10-17 Thread Dan Williams
/claim.c > +++ b/drivers/nvdimm/claim.c > @@ -200,11 +200,10 @@ ssize_t nd_namespace_store(struct device *dev, > } > break; > default: > len = -EBUSY; > goto out_attach; > - break; > } Acked-by: Dan Williams ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH RFC PKS/PMEM 33/58] fs/cramfs: Utilize new kmap_thread()

2020-10-13 Thread Dan Williams
On Tue, Oct 13, 2020 at 12:37 PM Matthew Wilcox wrote: > > On Tue, Oct 13, 2020 at 11:44:29AM -0700, Dan Williams wrote: > > On Fri, Oct 9, 2020 at 12:52 PM wrote: > > > > > > From: Ira Weiny > > > > > > The kmap() calls in this FS are localized t

Re: [PATCH RFC PKS/PMEM 33/58] fs/cramfs: Utilize new kmap_thread()

2020-10-13 Thread Dan Williams
On Fri, Oct 9, 2020 at 12:52 PM wrote: > > From: Ira Weiny > > The kmap() calls in this FS are localized to a single thread. To avoid > the over head of global PKRS updates use the new kmap_thread() call. > > Cc: Nicolas Pitre > Signed-off-by: Ira Weiny > --- > fs/cramfs/inode.c | 10

Re: [PATCH v2 14/17] resource: Move devmem revoke code to resource framework

2020-10-09 Thread Dan Williams
On Fri, Oct 9, 2020 at 7:32 AM Jason Gunthorpe wrote: > > On Fri, Oct 09, 2020 at 04:24:45PM +0200, Daniel Vetter wrote: > > On Fri, Oct 9, 2020 at 2:31 PM Jason Gunthorpe wrote: > > > > > > On Fri, Oct 09, 2020 at 09:59:31AM +0200, Daniel Vetter wrote: > > > > > > > +struct address_space

Re: [PATCH 10/13] PCI: revoke mappings like devmem

2020-10-08 Thread Dan Williams
On Thu, Oct 8, 2020 at 1:13 AM Daniel Vetter wrote: > > On Thu, Oct 8, 2020 at 9:50 AM Dan Williams wrote: > > > > On Wed, Oct 7, 2020 at 4:25 PM Jason Gunthorpe wrote: > > > > > > On Wed, Oct 07, 2020 at 12:33:06PM -0700, Dan Williams wrote: > >

Re: [PATCH 10/13] PCI: revoke mappings like devmem

2020-10-08 Thread Dan Williams
On Wed, Oct 7, 2020 at 4:25 PM Jason Gunthorpe wrote: > > On Wed, Oct 07, 2020 at 12:33:06PM -0700, Dan Williams wrote: > > On Wed, Oct 7, 2020 at 11:11 AM Daniel Vetter > > wrote: > > > > > > Since 3234ac664a87 ("/dev/mem: Revoke mappings when a driver

Re: [PATCH 10/13] PCI: revoke mappings like devmem

2020-10-07 Thread Dan Williams
On Wed, Oct 7, 2020 at 3:23 PM Dan Williams wrote: > > On Wed, Oct 7, 2020 at 12:49 PM Daniel Vetter wrote: > > > > On Wed, Oct 7, 2020 at 9:33 PM Dan Williams > > wrote: > > > > > > On Wed, Oct 7, 2020 at 11:11 AM Daniel Vetter > > > w

Re: [PATCH 10/13] PCI: revoke mappings like devmem

2020-10-07 Thread Dan Williams
On Wed, Oct 7, 2020 at 12:49 PM Daniel Vetter wrote: > > On Wed, Oct 7, 2020 at 9:33 PM Dan Williams wrote: > > > > On Wed, Oct 7, 2020 at 11:11 AM Daniel Vetter > > wrote: > > > > > > Since 3234ac664a87 ("/dev/mem: Revoke mappings when a drive

Re: [PATCH 10/13] PCI: revoke mappings like devmem

2020-10-07 Thread Dan Williams
On Wed, Oct 7, 2020 at 11:11 AM Daniel Vetter wrote: > > Since 3234ac664a87 ("/dev/mem: Revoke mappings when a driver claims > the region") /dev/kmem zaps ptes when the kernel requests exclusive > acccess to an iomem region. And with CONFIG_IO_STRICT_DEVMEM, this is > the default for all driver

Re: [PATCH v4 11/23] device-dax: Kill dax_kmem_res

2020-09-24 Thread Dan Williams
On Thu, Sep 24, 2020 at 2:42 PM David Hildenbrand wrote: > > > > > Am 24.09.2020 um 23:26 schrieb Dan Williams : > > > > [..] > >>> I'm not suggesting to busy the whole "virtio" range, just the portion > >>> that's about to be passed

Re: [PATCH v4 11/23] device-dax: Kill dax_kmem_res

2020-09-24 Thread Dan Williams
[..] > > I'm not suggesting to busy the whole "virtio" range, just the portion > > that's about to be passed to add_memory_driver_managed(). > > I'm afraid I don't get your point. For virtio-mem: > > Before: > > 1. Create virtio0 container resource > > 2. (somewhen in the future)

Re: [PATCH v4 11/23] device-dax: Kill dax_kmem_res

2020-09-24 Thread Dan Williams
On Thu, Sep 24, 2020 at 12:26 AM David Hildenbrand wrote: > > On 23.09.20 23:41, Dan Williams wrote: > > On Wed, Sep 23, 2020 at 1:04 AM David Hildenbrand wrote: > >> > >> On 08.09.20 17:33, Joao Martins wrote: > >>> [Sorry for the late respon

Re: [PATCH v4 11/23] device-dax: Kill dax_kmem_res

2020-09-23 Thread Dan Williams
On Wed, Sep 23, 2020 at 1:04 AM David Hildenbrand wrote: > > On 08.09.20 17:33, Joao Martins wrote: > > [Sorry for the late response] > > > > On 8/21/20 11:06 AM, David Hildenbrand wrote: > >> On 03.08.20 07:03, Dan Williams wrote: > >>> @@ -37,109 +

Re: [PATCH v4 00/23] device-dax: Support sub-dividing soft-reserved ranges

2020-09-22 Thread Dan Williams
On Tue, Sep 8, 2020 at 3:46 AM David Hildenbrand wrote: > > On 22.08.20 01:21, Andrew Morton wrote: > > On Wed, 19 Aug 2020 18:53:57 -0700 Dan Williams > > wrote: > > > >>> I think I am missing some important pieces. Bear with me. > >> > >>

Re: [PATCH v4 00/23] device-dax: Support sub-dividing soft-reserved ranges

2020-08-21 Thread Dan Williams
On Fri, Aug 21, 2020 at 11:30 AM David Hildenbrand wrote: > > On 21.08.20 20:27, Dan Williams wrote: > > On Fri, Aug 21, 2020 at 3:15 AM David Hildenbrand wrote: > >> > >>>> > >>>> 1. On x86-64, e820 indicates "soft-reserved" memo

Re: [PATCH v4 00/23] device-dax: Support sub-dividing soft-reserved ranges

2020-08-21 Thread Dan Williams
On Fri, Aug 21, 2020 at 3:15 AM David Hildenbrand wrote: > > >> > >> 1. On x86-64, e820 indicates "soft-reserved" memory. This memory is not > >> automatically used in the buddy during boot, but remains untouched > >> (similar to pmem). But as it involves ACPI as well, it could also be > >> used

Re: [PATCH v4 00/23] device-dax: Support sub-dividing soft-reserved ranges

2020-08-19 Thread Dan Williams
On Mon, Aug 3, 2020 at 12:48 AM David Hildenbrand wrote: > > [...] > > > Well, no v5.8-rc8 to line this up for v5.9, so next best is early > > integration into -mm before other collisions develop. > > > > Chatted with Justin offline and it currently appears that the missing > > numa information

[PATCH v4 18/23] device-dax: Add dis-contiguous resource support

2020-08-02 Thread Dan Williams
d-by: Joao Martins Signed-off-by: Dan Williams --- drivers/dax/bus.c | 230 +++- drivers/dax/dax-private.h |9 +- drivers/dax/device.c | 55 ++ drivers/dax/kmem.c | 132 +++ tools/test

[PATCH v4 14/23] drivers/base: Make device_find_child_by_name() compatible with sysfs inputs

2020-08-02 Thread Dan Williams
iewed-by: Greg Kroah-Hartman Signed-off-by: Dan Williams --- drivers/base/core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index 2169c5132558..231189dd6599 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -3328,7 +332

[PATCH v4 22/23] dax/hmem: Introduce dax_hmem.region_idle parameter

2020-08-02 Thread Dan Williams
-off-by: Joao Martins Link: https://lore.kernel.org/r/20200716172913.19658-4-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/hmem/hmem.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dax/hmem/hmem.c b/drivers/dax/hmem/hmem.c index

[PATCH v4 16/23] mm/memremap_pages: Convert to 'struct range'

2020-08-02 Thread Dan Williams
lerman Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: Vishal Verma Cc: Dave Jiang Cc: Ben Skeggs Cc: David Airlie Cc: Daniel Vetter Cc: Ira Weiny Cc: Jason Gunthorpe Signed-off-by: Dan Williams --- arch/powerpc/kvm/book3s_hv_uvmem.c | 13 +++-- drivers/dax/bus.c

[PATCH v4 21/23] device-dax: Add an 'align' attribute

2020-08-02 Thread Dan Williams
with 2M and then we switch to 1G. So, we validate all ranges against the new value being attempted, post resizing. Signed-off-by: Joao Martins Link: https://lore.kernel.org/r/20200716172913.19658-3-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/bus.c | 93

[PATCH v4 15/23] device-dax: Add resize support

2020-08-02 Thread Dan Williams
_dax,kmem}/bind echo dax0.1 > ../drivers/{device_dax,kmem}/bind Instances can be destroyed by: echo $device > $(readlink -f $device)../dax_region/delete Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 161 ++---

[PATCH v4 20/23] device-dax: Make align a per-device property

2020-08-02 Thread Dan Williams
: https://lore.kernel.org/r/20200716172913.19658-2-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/bus.c |1 + drivers/dax/dax-private.h |3 +++ drivers/dax/device.c | 37 +++-- 3 files changed, 19 insertions(+), 22

[PATCH v4 23/23] device-dax: Add a range mapping allocation attribute

2020-08-02 Thread Dan Williams
9658-5-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/bus.c | 64 + 1 file changed, 64 insertions(+) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index b984213c315f..092112bba6ed 100644 --- a/drivers/dax/bus.c +++ b/d

[PATCH v4 19/23] device-dax: Introduce 'mapping' devices

2020-08-02 Thread Dan Williams
is enabled. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 191 + drivers/dax/dax-private.h | 14 +++ 2 files changed, 203 insertions(+), 2 deletions(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 8dd82ea9d53d

[PATCH v4 17/23] mm/memremap_pages: Support multiple ranges per invocation

2020-08-02 Thread Dan Williams
In support of device-dax growing the ability to front physically dis-contiguous ranges of memory, update devm_memremap_pages() to track multiple ranges with a single reference counter and devm instance. Cc: Paul Mackerras Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc

[PATCH v4 10/23] device-dax: Make pgmap optional for instance creation

2020-08-02 Thread Dan Williams
the resource range via a new @range property of 'struct dev_dax_data'. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 29 +++-- drivers/dax/bus.h |2 ++ drivers/dax/dax-private.h |9 - drivers/dax/device.c

[PATCH v4 13/23] device-dax: Introduce 'seed' devices

2020-08-02 Thread Dan Williams
not request. For now just add the device creation, teardown, and ->probe() prevention. A later patch will arrange for the 'dax/size' attribute to be writable to allocate capacity from the region. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c |

[PATCH v4 05/23] resource: Report parent to walk_iomem_res_desc() callback

2020-08-02 Thread Dan Williams
Cc: Wei Yang Cc: Tom Lendacky Signed-off-by: Dan Williams --- kernel/resource.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/kernel/resource.c b/kernel/resource.c index 841737bbda9e..f1175ce93a1d 100644 --- a/kernel/resource.c +++ b/kernel/resource.c

[PATCH v4 11/23] device-dax: Kill dax_kmem_res

2020-08-02 Thread Dan Williams
. - The "Hot-remove not yet implemented." comment is stale since hotremove support is now included. Cc: David Hildenbrand Cc: Vishal Verma Cc: Dave Hansen Cc: Pavel Tatashin Signed-off-by: Dan Williams --- drivers/dax/dax-private.h |3 - drivers/dax/kmem.c

[PATCH v4 08/23] device-dax: Drop the dax_region.pfn_flags attribute

2020-08-02 Thread Dan Williams
All callers specify the same flags to alloc_dax_region(), so there is no need to allow for anything other than PFN_DEV|PFN_MAP, or carry a ->pfn_flags around on the region. Device-dax instances are always page backed. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bu

[PATCH v4 12/23] device-dax: Add an allocation interface for device-dax instances

2020-08-02 Thread Dan Williams
. This is per Jeff's feedback the last time dynamic device-dax capacity allocation support was discussed. Link: https://lore.kernel.org/linux-nvdimm/x49shpp3zn8@segfault.boston.devel.redhat.com Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 120

[PATCH v4 07/23] ACPI: HMAT: Attach a device for each soft-reserved range

2020-08-02 Thread Dan Williams
uvel Cc: "Rafael J. Wysocki" Cc: Jeff Moyer Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Joao Martins Signed-off-by: Dan Williams --- drivers/dax/hmem/Makefile |3 ++- drivers/dax/hmem/device.c | 35 +++ 2 files changed, 37 insertions(+), 1

[PATCH v4 04/23] ACPI: HMAT: Refactor hmat_register_target_device to hmem_register_device

2020-08-02 Thread Dan Williams
ain values and instead relies on numa_map_to_online_node() to determine the numa node for the device. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/158318761484.2216124.2049322072599482736.st...@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams --- drivers/acpi

[PATCH v4 09/23] device-dax: Move instance creation parameters to 'struct dev_dax_data'

2020-08-02 Thread Dan Williams
In preparation for adding more parameters to instance creation, move existing parameters to a new struct. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 14 +++--- drivers/dax/bus.h | 16 drivers/dax/hmem/hmem.c |8

[PATCH v4 06/23] mm/memory_hotplug: Introduce default phys_to_target_node() implementation

2020-08-02 Thread Dan Williams
message in the generic memory_add_physaddr_to_nid() implementation is fixed up to properly reflect that memory_add_physaddr_to_nid() communicates "online" node info and phys_to_target_node() indicates "target / to-be-onlined" node info. Cc: David Hildenbrand Cc: Mike Rapoport Cc: Jia He Signed-of

[PATCH v4 00/23] device-dax: Support sub-dividing soft-reserved ranges

2020-08-02 Thread Dan Williams
rnel.org/r/154899811738.3165233.12325692939590944259.st...@dwillia2-desk3.amr.corp.intel.com [5]: http://lore.kernel.org/r/20200110190313.17144-1-joao.m.mart...@oracle.com --- Dan Williams (19): x86/numa: Cleanup configuration dependent command-line options x86/numa: Add 'nohmat' option ef

[PATCH v4 02/23] x86/numa: Add 'nohmat' option

2020-08-02 Thread Dan Williams
ov Cc: "H. Peter Anvin" Signed-off-by: Dan Williams --- Documentation/x86/x86_64/boot-options.rst |4 arch/x86/mm/numa.c|2 ++ drivers/acpi/numa/hmat.c |8 +++- include/acpi/acpi_numa.h |8 4 files ch

[PATCH v4 03/23] efi/fake_mem: Arrange for a resource entry per efi_fake_mem instance

2020-08-02 Thread Dan Williams
Anvin" Cc: x...@kernel.org Acked-by: Ard Biesheuvel Signed-off-by: Dan Williams --- arch/x86/kernel/e820.c | 16 +++- drivers/firmware/efi/x86_fake_mem.c | 12 +--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/e820.c

[PATCH v4 01/23] x86/numa: Cleanup configuration dependent command-line options

2020-08-02 Thread Dan Williams
at compile-time. Suggested-by: Rafael J. Wysocki Signed-off-by: Dan Williams --- arch/x86/include/asm/numa.h |8 +++- arch/x86/mm/numa.c |8 ++-- arch/x86/mm/numa_emulation.c |3 ++- arch/x86/xen/enlighten_pv.c |2 +- drivers/acpi/numa/srat.c |9

Re: [PATCH v3 02/23] x86/numa: Add 'nohmat' option

2020-08-01 Thread Dan Williams
On Fri, Jul 31, 2020 at 8:51 PM Randy Dunlap wrote: > > On 7/31/20 8:25 PM, Dan Williams wrote: > > Disable parsing of the HMAT for debug, to workaround broken platform > > instances, or cases where it is otherwise not wanted. > > > > --- > > arch/x86/mm/numa

[PATCH v3 15/23] device-dax: Add resize support

2020-07-31 Thread Dan Williams
_dax,kmem}/bind echo dax0.1 > ../drivers/{device_dax,kmem}/bind Instances can be destroyed by: echo $device > $(readlink -f $device)../dax_region/delete Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 161 ++---

[PATCH v3 22/23] dax/hmem: Introduce dax_hmem.region_idle parameter

2020-07-31 Thread Dan Williams
-off-by: Joao Martins Link: https://lore.kernel.org/r/20200716172913.19658-4-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/hmem/hmem.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dax/hmem/hmem.c b/drivers/dax/hmem/hmem.c index

[PATCH v3 20/23] device-dax: Make align a per-device property

2020-07-31 Thread Dan Williams
: https://lore.kernel.org/r/20200716172913.19658-2-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/bus.c |1 + drivers/dax/dax-private.h |1 + drivers/dax/device.c | 35 +++ 3 files changed, 17 insertions(+), 20 deletions

[PATCH v3 19/23] device-dax: Introduce 'mapping' devices

2020-07-31 Thread Dan Williams
is enabled. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 191 + drivers/dax/dax-private.h | 14 +++ 2 files changed, 203 insertions(+), 2 deletions(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index f342e36c69a1

[PATCH v3 18/23] device-dax: Add dis-contiguous resource support

2020-07-31 Thread Dan Williams
d-by: Joao Martins Signed-off-by: Dan Williams --- drivers/dax/bus.c | 230 +++- drivers/dax/dax-private.h |9 +- drivers/dax/device.c | 55 ++ drivers/dax/kmem.c | 132 +++ tools/test

[PATCH v3 17/23] mm/memremap_pages: Support multiple ranges per invocation

2020-07-31 Thread Dan Williams
In support of device-dax growing the ability to front physically dis-contiguous ranges of memory, update devm_memremap_pages() to track multiple ranges with a single reference counter and devm instance. Cc: Paul Mackerras Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc

[PATCH v3 21/23] device-dax: Add an 'align' attribute

2020-07-31 Thread Dan Williams
with 2M and then we switch to 1G. So, we validate all ranges against the new value being attempted, post resizing. Signed-off-by: Joao Martins Link: https://lore.kernel.org/r/20200716172913.19658-3-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/bus.c | 102

[PATCH v3 23/23] device-dax: Add a range mapping allocation attribute

2020-07-31 Thread Dan Williams
9658-5-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/bus.c | 64 + 1 file changed, 64 insertions(+) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 7a9439132573..aa67555ba183 100644 --- a/drivers/dax/bus.c +++ b/d

[PATCH v3 10/23] device-dax: Make pgmap optional for instance creation

2020-07-31 Thread Dan Williams
the resource range via a new @range property of 'struct dev_dax_data'. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 29 +++-- drivers/dax/bus.h |2 ++ drivers/dax/dax-private.h |9 - drivers/dax/device.c

[PATCH v3 16/23] mm/memremap_pages: Convert to 'struct range'

2020-07-31 Thread Dan Williams
lerman Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: Vishal Verma Cc: Dave Jiang Cc: Ben Skeggs Cc: David Airlie Cc: Daniel Vetter Cc: Ira Weiny Cc: Jason Gunthorpe Signed-off-by: Dan Williams --- arch/powerpc/kvm/book3s_hv_uvmem.c | 13 +++-- drivers/dax/bus.c

[PATCH v3 08/23] device-dax: Drop the dax_region.pfn_flags attribute

2020-07-31 Thread Dan Williams
All callers specify the same flags to alloc_dax_region(), so there is no need to allow for anything other than PFN_DEV|PFN_MAP, or carry a ->pfn_flags around on the region. Device-dax instances are always page backed. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bu

[PATCH v3 13/23] device-dax: Introduce 'seed' devices

2020-07-31 Thread Dan Williams
not request. For now just add the device creation, teardown, and ->probe() prevention. A later patch will arrange for the 'dax/size' attribute to be writable to allocate capacity from the region. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c |

[PATCH v3 14/23] drivers/base: Make device_find_child_by_name() compatible with sysfs inputs

2020-07-31 Thread Dan Williams
iewed-by: Greg Kroah-Hartman Signed-off-by: Dan Williams --- drivers/base/core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index 2169c5132558..231189dd6599 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -3328,7 +332

[PATCH v3 11/23] device-dax: Kill dax_kmem_res

2020-07-31 Thread Dan Williams
. - The "Hot-remove not yet implemented." comment is stale since hotremove support is now included. Cc: David Hildenbrand Cc: Vishal Verma Cc: Dave Hansen Cc: Pavel Tatashin Signed-off-by: Dan Williams --- drivers/dax/dax-private.h |3 - drivers/dax/kmem.c

[PATCH v3 12/23] device-dax: Add an allocation interface for device-dax instances

2020-07-31 Thread Dan Williams
. This is per Jeff's feedback the last time dynamic device-dax capacity allocation support was discussed. Link: https://lore.kernel.org/linux-nvdimm/x49shpp3zn8@segfault.boston.devel.redhat.com Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 120

[PATCH v3 07/23] ACPI: HMAT: Attach a device for each soft-reserved range

2020-07-31 Thread Dan Williams
uvel Cc: "Rafael J. Wysocki" Cc: Jeff Moyer Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Joao Martins Signed-off-by: Dan Williams --- drivers/dax/hmem/Makefile |3 ++- drivers/dax/hmem/device.c | 35 +++ 2 files changed, 37 insertions(+), 1

[PATCH v3 00/23] device-dax: Support sub-dividing soft-reserved ranges

2020-07-31 Thread Dan Williams
rnel.org/r/20200110190313.17144-1-joao.m.mart...@oracle.com --- Dan Williams (19): x86/numa: Cleanup configuration dependent command-line options x86/numa: Add 'nohmat' option efi/fake_mem: Arrange for a resource entry per efi_fake_mem instance ACPI: HMAT: Refactor hmat_register_tar

[PATCH v3 06/23] mm/memory_hotplug: Introduce default phys_to_target_node() implementation

2020-07-31 Thread Dan Williams
message in the generic memory_add_physaddr_to_nid() implementation is fixed up to properly reflect that memory_add_physaddr_to_nid() communicates "online" node info and phys_to_target_node() indicates "target / to-be-onlined" node info. Cc: David Hildenbrand Cc: Mike Rapoport Cc: Jia He Signed-of

[PATCH v3 05/23] resource: Report parent to walk_iomem_res_desc() callback

2020-07-31 Thread Dan Williams
Cc: Wei Yang Cc: Tom Lendacky Signed-off-by: Dan Williams --- kernel/resource.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/kernel/resource.c b/kernel/resource.c index 841737bbda9e..f1175ce93a1d 100644 --- a/kernel/resource.c +++ b/kernel/resource.c

[PATCH v3 04/23] ACPI: HMAT: Refactor hmat_register_target_device to hmem_register_device

2020-07-31 Thread Dan Williams
ain values and instead relies on numa_map_to_online_node() to determine the numa node for the device. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/158318761484.2216124.2049322072599482736.st...@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams --- drivers/acpi

[PATCH v3 09/23] device-dax: Move instance creation parameters to 'struct dev_dax_data'

2020-07-31 Thread Dan Williams
In preparation for adding more parameters to instance creation, move existing parameters to a new struct. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 14 +++--- drivers/dax/bus.h | 16 drivers/dax/hmem/hmem.c |8

[PATCH v3 01/23] x86/numa: Cleanup configuration dependent command-line options

2020-07-31 Thread Dan Williams
at compile-time. Suggested-by: Rafael J. Wysocki Signed-off-by: Dan Williams --- arch/x86/include/asm/numa.h |8 +++- arch/x86/mm/numa.c |8 ++-- arch/x86/mm/numa_emulation.c |3 ++- arch/x86/xen/enlighten_pv.c |2 +- drivers/acpi/numa/srat.c |9

[PATCH v3 03/23] efi/fake_mem: Arrange for a resource entry per efi_fake_mem instance

2020-07-31 Thread Dan Williams
Anvin" Cc: x...@kernel.org Acked-by: Ard Biesheuvel Signed-off-by: Dan Williams --- arch/x86/kernel/e820.c | 16 +++- drivers/firmware/efi/x86_fake_mem.c | 12 +--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/e820.c

[PATCH v3 02/23] x86/numa: Add 'nohmat' option

2020-07-31 Thread Dan Williams
ov Cc: "H. Peter Anvin" Signed-off-by: Dan Williams --- arch/x86/mm/numa.c |2 ++ drivers/acpi/numa/hmat.c |8 +++- include/acpi/acpi_numa.h |8 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 87c528

  1   2   3   >