[PATCH RFC 03/19] selftests/vm: cow: R/O long-term pinning reliability tests for non-anon pages

2022-11-07 Thread David Hildenbrand
ned-off-by: David Hildenbrand --- tools/testing/selftests/vm/cow.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/vm/cow.c b/tools/testing/selftests/vm/cow.c index 93c643bcdcf5..40ba45d0c6b4 100644 --- a/tools/testing/selftest

[PATCH RFC 02/19] selftests/vm: cow: basic COW tests for non-anonymous pages

2022-11-07 Thread David Hildenbrand
d and tmpfile() * Hugetlb pages via memfd Fortunately, all tests pass. Signed-off-by: David Hildenbrand --- tools/testing/selftests/vm/cow.c | 338 ++- 1 file changed, 337 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/vm/cow.c b/tools/testing/selftes

[PATCH RFC 01/19] selftests/vm: anon_cow: prepare for non-anonymous COW tests

2022-11-07 Thread David Hildenbrand
"cow". Signed-off-by: David Hildenbrand --- tools/testing/selftests/vm/.gitignore | 2 +- tools/testing/selftests/vm/Makefile | 10 tools/testing/selftests/vm/check_config.sh| 4 +-- .../selftests/vm/{anon_cow.c => cow.c}| 25 +++

[PATCH RFC 00/19] mm/gup: remove FOLL_FORCE usage from drivers (reliable R/O long-term pinning)

2022-11-07 Thread David Hildenbrand
tthew Wilcox (Oracle) Cc: Mike Kravetz Cc: Muchun Song Cc: Shuah Khan Cc: David Airlie Cc: Oded Gabbay Cc: Arnd Bergmann David Hildenbrand (19): selftests/vm: anon_cow: prepare for non-anonymous COW tests selftests/vm: cow: basic COW tests for non-anonymous pages selftests/vm: c

Re: [PATCH] mm/gup.c: Fix formating in check_and_migrate_movable_page()

2022-07-21 Thread David Hildenbrand
On 21.07.22 04:05, Alistair Popple wrote: > Commit b05a79d4377f ("mm/gup: migrate device coherent pages when pinning > instead of failing") added a badly formatted if statement. Fix it. > > Signed-off-by: Alistair Popple > Reported-by: David Hildenbrand > --- >

Re: [PATCH v9 06/14] mm/gup: migrate device coherent pages when pinning instead of failing

2022-07-19 Thread David Hildenbrand
On 18.07.22 22:32, Andrew Morton wrote: > On Mon, 18 Jul 2022 12:56:29 +0200 David Hildenbrand wrote: > >>> /* >>> * Try to move out any movable page before pinning the range. >>> */ >>> @@ -1919,7 +1948,8 @@ s

Re: [PATCH v9 02/14] mm: move page zone helpers from mm.h to mmzone.h

2022-07-18 Thread David Hildenbrand
On 18.07.22 19:52, Felix Kuehling wrote: > On 2022-07-18 06:50, David Hildenbrand wrote: >> On 15.07.22 17:05, Alex Sierra wrote: >>> [WHY] >>> It makes more sense to have these helpers in zone specific header >>> file, rather than the generic mm.h >>>

Re: [PATCH v9 06/14] mm/gup: migrate device coherent pages when pinning instead of failing

2022-07-18 Thread David Hildenbrand
_error_count) > + if (!list_empty(&movable_page_list) || isolation_error_count > + || coherent_pages) The common style is to a) add the || to the end of the previous line b) indent such the we have a nice-to-read alignment if (!list_empty(&movable_page_list) || isol

Re: [PATCH v9 04/14] mm: handling Non-LRU pages returned by vm_normal_pages

2022-07-18 Thread David Hildenbrand
; Acked-by: Felix Kuehling (v2) > Reviewed-by: Alistair Popple (v6) > Acked-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH v9 02/14] mm: move page zone helpers from mm.h to mmzone.h

2022-07-18 Thread David Hildenbrand
On 15.07.22 17:05, Alex Sierra wrote: > [WHY] > It makes more sense to have these helpers in zone specific header > file, rather than the generic mm.h > > Signed-off-by: Alex Sierra Acked-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH v8 07/15] mm/gup: migrate device coherent pages when pinning instead of failing

2022-07-11 Thread David Hildenbrand
On 11.07.22 16:00, Matthew Wilcox wrote: > On Mon, Jul 11, 2022 at 03:35:42PM +0200, David Hildenbrand wrote: >>> + /* >>> +* Device coherent pages are managed by a driver and should not >>> +* be pinned indefinitely as it

Re: [PATCH v8 02/15] mm: move page zone helpers into new header-specific file

2022-07-11 Thread David Hildenbrand
On 08.07.22 23:25, Felix Kuehling wrote: > On 2022-07-08 07:28, David Hildenbrand wrote: >> On 07.07.22 21:03, Alex Sierra wrote: >>> [WHY] >>> Have a cleaner way to expose all page zone helpers in one header >> What exactly is a "page zone"? Do y

Re: [PATCH v8 06/15] mm: remove the vma check in migrate_vma_setup()

2022-07-11 Thread David Hildenbrand
On 07.07.22 21:03, Alex Sierra wrote: > From: Alistair Popple > > migrate_vma_setup() checks that a valid vma is passed so that the page > tables can be walked to find the pfns associated with a given address > range. However in some cases the pfns are already known, such as when > migrating devi

Re: [PATCH v8 07/15] mm/gup: migrate device coherent pages when pinning instead of failing

2022-07-11 Thread David Hildenbrand
On 07.07.22 21:03, Alex Sierra wrote: > From: Alistair Popple > > Currently any attempts to pin a device coherent page will fail. This is > because device coherent pages need to be managed by a device driver, and > pinning them would prevent a driver from migrating them off the device. > > Howev

Re: [PATCH v8 02/15] mm: move page zone helpers into new header-specific file

2022-07-08 Thread David Hildenbrand
On 07.07.22 21:03, Alex Sierra wrote: > [WHY] > Have a cleaner way to expose all page zone helpers in one header What exactly is a "page zone"? Do you mean a buddy zone as in include/linux/mmzone.h ? -- Thanks, David / dhildenb

Re: [PATCH v8 01/15] mm: rename is_pinnable_pages to is_longterm_pinnable_pages

2022-07-08 Thread David Hildenbrand
--- > include/linux/mm.h | 8 > mm/gup.c | 4 ++-- > mm/gup_test.c | 2 +- > mm/hugetlb.c | 2 +- > 4 files changed, 8 insertions(+), 8 deletions(-) > Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH v7 04/14] mm: add device coherent vma selection for memory migration

2022-06-30 Thread David Hildenbrand
On 30.06.22 13:44, Alistair Popple wrote: > > David Hildenbrand writes: > >> On 29.06.22 05:54, Alex Sierra wrote: >>> This case is used to migrate pages from device memory, back to system >>> memory. Device coherent type memory is cache coherent from

Re: [PATCH v7 04/14] mm: add device coherent vma selection for memory migration

2022-06-30 Thread David Hildenbrand
On 29.06.22 05:54, Alex Sierra wrote: > This case is used to migrate pages from device memory, back to system > memory. Device coherent type memory is cache coherent from device and CPU > point of view. > > Signed-off-by: Alex Sierra > Acked-by: Felix Kuehling > Reviewed-by: Alistair Poppple >

Re: [PATCH v7 01/14] mm: rename is_pinnable_pages to is_pinnable_longterm_pages

2022-06-29 Thread David Hildenbrand
On 30.06.22 00:08, Felix Kuehling wrote: > On 2022-06-29 03:33, David Hildenbrand wrote: >> On 29.06.22 05:54, Alex Sierra wrote: >>> is_pinnable_page() and folio_is_pinnable() were renamed to >>> is_longterm_pinnable_page() and folio_is_longterm_pinnable() >>&g

Re: [PATCH v7 02/14] mm: add zone device coherent type memory support

2022-06-29 Thread David Hildenbrand
ellwig >From what I can tell, this looks good to me Acked-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH v7 03/14] mm: handling Non-LRU pages returned by vm_normal_pages

2022-06-29 Thread David Hildenbrand
continue; > > /* Also skip shared copy-on-write pages */ In -next/-mm there is now an additional can_change_pte_writable() that calls vm_normal_page() -- added by me. I assume that that is indeed fine because we can simply map device coherent pages writable. Besides the nits, LGTM Acked-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH v7 01/14] mm: rename is_pinnable_pages to is_pinnable_longterm_pages

2022-06-29 Thread David Hildenbrand
On 29.06.22 05:54, Alex Sierra wrote: > is_pinnable_page() and folio_is_pinnable() were renamed to > is_longterm_pinnable_page() and folio_is_longterm_pinnable() > respectively. These functions are used in the FOLL_LONGTERM flag > context. Subject talks about "*_pages" Can you elaborate why the

Re: [PATCH v6 02/14] mm: handling Non-LRU pages returned by vm_normal_pages

2022-06-28 Thread David Hildenbrand
On 28.06.22 02:14, Alex Sierra wrote: > With DEVICE_COHERENT, we'll soon have vm_normal_pages() return > device-managed anonymous pages that are not LRU pages. Although they > behave like normal pages for purposes of mapping in CPU page, and for > COW. They do not support LRU lists, NUMA migration

Re: [PATCH v6 06/14] mm: add device coherent checker to is_pinnable_page

2022-06-28 Thread David Hildenbrand
On 28.06.22 02:14, Alex Sierra wrote: > is_device_coherent checker was added to is_pinnable_page and renamed > to is_longterm_pinnable_page. The reason is that device coherent > pages are not supported for longterm pinning. > > Signed-off-by: Alex Sierra > --- > include/linux/memremap.h | 25 +++

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-23 Thread David Hildenbrand
On 23.06.22 20:20, Sierra Guiza, Alejandro (Alex) wrote: > > On 6/23/2022 2:57 AM, David Hildenbrand wrote: >> On 23.06.22 01:16, Sierra Guiza, Alejandro (Alex) wrote: >>> On 6/21/2022 11:16 AM, David Hildenbrand wrote: >>>> On 21.06.22 18:08, Sierra Guiza, Alej

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-23 Thread David Hildenbrand
On 23.06.22 01:16, Sierra Guiza, Alejandro (Alex) wrote: > > On 6/21/2022 11:16 AM, David Hildenbrand wrote: >> On 21.06.22 18:08, Sierra Guiza, Alejandro (Alex) wrote: >>> On 6/21/2022 7:25 AM, David Hildenbrand wrote: >>>> On 21.06.22 13:55, Alistair Popp

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-21 Thread David Hildenbrand
On 21.06.22 18:08, Sierra Guiza, Alejandro (Alex) wrote: > > On 6/21/2022 7:25 AM, David Hildenbrand wrote: >> On 21.06.22 13:55, Alistair Popple wrote: >>> David Hildenbrand writes: >>> >>>> On 21.06.22 13:25, Felix Kuehling wrote: >>>>>

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-21 Thread David Hildenbrand
On 21.06.22 13:55, Alistair Popple wrote: > > David Hildenbrand writes: > >> On 21.06.22 13:25, Felix Kuehling wrote: >>> >>> Am 6/17/22 um 23:19 schrieb David Hildenbrand: >>>> On 17.06.22 21:27, Sierra Guiza, Alejandro (Alex) wrote: >>

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-21 Thread David Hildenbrand
On 21.06.22 13:25, Felix Kuehling wrote: > > Am 6/17/22 um 23:19 schrieb David Hildenbrand: >> On 17.06.22 21:27, Sierra Guiza, Alejandro (Alex) wrote: >>> On 6/17/2022 12:33 PM, David Hildenbrand wrote: >>>> On 17.06.22 19:20, Sierra Guiza, Alejandro (Alex)

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-17 Thread David Hildenbrand
On 17.06.22 21:27, Sierra Guiza, Alejandro (Alex) wrote: > > On 6/17/2022 12:33 PM, David Hildenbrand wrote: >> On 17.06.22 19:20, Sierra Guiza, Alejandro (Alex) wrote: >>> On 6/17/2022 4:40 AM, David Hildenbrand wrote: >>>> On 31.05.22 22:00, Alex Sierra wrote:

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-17 Thread David Hildenbrand
On 17.06.22 19:20, Sierra Guiza, Alejandro (Alex) wrote: > > On 6/17/2022 4:40 AM, David Hildenbrand wrote: >> On 31.05.22 22:00, Alex Sierra wrote: >>> Device memory that is cache coherent from device and CPU point of view. >>> This is used on platforms that hav

Re: [PATCH v5 02/13] mm: handling Non-LRU pages returned by vm_normal_pages

2022-06-17 Thread David Hildenbrand
On 31.05.22 22:00, Alex Sierra wrote: > With DEVICE_COHERENT, we'll soon have vm_normal_pages() return > device-managed anonymous pages that are not LRU pages. Although they > behave like normal pages for purposes of mapping in CPU page, and for > COW. They do not support LRU lists, NUMA migration

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-17 Thread David Hildenbrand
On 31.05.22 22:00, Alex Sierra wrote: > Device memory that is cache coherent from device and CPU point of view. > This is used on platforms that have an advanced system bus (like CAPI > or CXL). Any page of a process can be migrated to such memory. However, > no one should be allowed to pin such me

Re: [PATCH v5 00/13] Add MEMORY_DEVICE_COHERENT for coherent device memory mapping

2022-06-17 Thread David Hildenbrand
On 17.06.22 04:19, Andrew Morton wrote: > On Tue, 31 May 2022 15:00:28 -0500 Alex Sierra wrote: > >> This is our MEMORY_DEVICE_COHERENT patch series rebased and updated >> for current 5.18.0 > > I plan to move this series into the non-rebasing mm-stable branch in a > few days. Unless sternly to

Re: [PATCH 2/3] mm/slab: delete cache_alloc_debugcheck_before()

2022-06-07 Thread David Hildenbrand
el Vetter > Cc: Christoph Lameter > Cc: Pekka Enberg > Cc: David Rientjes > Cc: Joonsoo Kim > Cc: Andrew Morton > Cc: Vlastimil Babka > Cc: Roman Gushchin > Cc: linux...@kvack.org > --- LGTM Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH 1/3] mm/page_alloc: use might_alloc()

2022-06-07 Thread David Hildenbrand
hould_fail_alloc_page(gfp_mask, order)) > return false; Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH v2 1/3] mm: add vm_normal_lru_pages for LRU handled pages only

2022-03-31 Thread David Hildenbrand
On 31.03.22 10:53, Christoph Hellwig wrote: >> -page = vm_normal_page(vma, addr, pte); >> +page = vm_normal_lru_page(vma, addr, pte); > > Why can't this deal with ZONE_DEVICE pages? It certainly has > nothing do with a LRU I think. In fact being able to have > stats that count say the nu

Re: [PATCH v1 1/3] mm: split vm_normal_pages for LRU and non-LRU handling

2022-03-17 Thread David Hildenbrand
On 17.03.22 03:54, Alistair Popple wrote: > Felix Kuehling writes: > >> On 2022-03-11 04:16, David Hildenbrand wrote: >>> On 10.03.22 18:26, Alex Sierra wrote: >>>> DEVICE_COHERENT pages introduce a subtle distinction in the way >>>> "normal&qu

Re: [PATCH v1 1/3] mm: split vm_normal_pages for LRU and non-LRU handling

2022-03-11 Thread David Hildenbrand
On 10.03.22 18:26, Alex Sierra wrote: > DEVICE_COHERENT pages introduce a subtle distinction in the way > "normal" pages can be used by various callers throughout the kernel. > They behave like normal pages for purposes of mapping in CPU page > tables, and for COW. But they do not support LRU lists

Re: [PATCH RFC 0/3] MAP_POPULATE for device memory

2022-03-07 Thread David Hildenbrand
On 07.03.22 15:22, Jarkko Sakkinen wrote: > On Mon, Mar 07, 2022 at 11:12:44AM +0100, David Hildenbrand wrote: >> On 06.03.22 06:32, Jarkko Sakkinen wrote: >>> For device memory (aka VM_IO | VM_PFNMAP) MAP_POPULATE does nothing. Allow >>> to use that for initializing the

Re: [PATCH RFC 0/3] MAP_POPULATE for device memory

2022-03-07 Thread David Hildenbrand
On 06.03.22 06:32, Jarkko Sakkinen wrote: > For device memory (aka VM_IO | VM_PFNMAP) MAP_POPULATE does nothing. Allow > to use that for initializing the device memory by providing a new callback > f_ops->populate() for the purpose. > > SGX patches are provided to show the callback in context. >

Re: [PATCH] mm: split vm_normal_pages for LRU and non-LRU handling

2022-03-01 Thread David Hildenbrand
On 01.03.22 17:30, Felix Kuehling wrote: > Am 2022-03-01 um 11:22 schrieb David Hildenbrand: >>>>> if (PageReserved(page)) >>>>> diff --git a/mm/migrate.c b/mm/migrate.c >>>>> index c31d04b46a5e..17d049311b78 100644 &

Re: [PATCH] mm: split vm_normal_pages for LRU and non-LRU handling

2022-03-01 Thread David Hildenbrand
>> >>> if (PageReserved(page)) >>> diff --git a/mm/migrate.c b/mm/migrate.c >>> index c31d04b46a5e..17d049311b78 100644 >>> --- a/mm/migrate.c >>> +++ b/mm/migrate.c >>> @@ -1614,7 +1614,7 @@ static int add_page_for_migration(struct mm_struct >>> *mm, unsigned long addr, >>>

Re: [PATCH] mm: split vm_normal_pages for LRU and non-LRU handling

2022-03-01 Thread David Hildenbrand
On 28.02.22 21:34, Alex Sierra wrote: > DEVICE_COHERENT pages introduce a subtle distinction in the way > "normal" pages can be used by various callers throughout the kernel. > They behave like normal pages for purposes of mapping in CPU page > tables, and for COW. But they do not support LRU lists

Re: [PATCH v6 01/10] mm: add zone device coherent type memory support

2022-02-16 Thread David Hildenbrand
On 16.02.22 03:36, Alistair Popple wrote: > On Wednesday, 16 February 2022 1:03:57 PM AEDT Jason Gunthorpe wrote: >> On Wed, Feb 16, 2022 at 12:23:44PM +1100, Alistair Popple wrote: >> >>> Device private and device coherent pages are not marked with pte_devmap and >>> they >>> are backed by a stru

Re: [PATCH v6 01/10] mm: add zone device coherent type memory support

2022-02-15 Thread David Hildenbrand
On 11.02.22 18:07, Felix Kuehling wrote: > > Am 2022-02-11 um 11:39 schrieb David Hildenbrand: >> On 11.02.22 17:15, David Hildenbrand wrote: >>> On 01.02.22 16:48, Alex Sierra wrote: >>>> Device memory that is cache coherent from device and CPU point of view. &g

Re: [PATCH v6 01/10] mm: add zone device coherent type memory support

2022-02-15 Thread David Hildenbrand
On 11.02.22 17:56, Jason Gunthorpe wrote: > On Fri, Feb 11, 2022 at 05:49:08PM +0100, David Hildenbrand wrote: >> On 11.02.22 17:45, Jason Gunthorpe wrote: >>> On Fri, Feb 11, 2022 at 05:15:25PM +0100, David Hildenbrand wrote: >>> >>>> ... I'm pretty

Re: [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-15 Thread David Hildenbrand
On 11.02.22 00:41, Alistair Popple wrote: > On Thursday, 10 February 2022 10:47:35 PM AEDT David Hildenbrand wrote: >> On 10.02.22 12:39, Alistair Popple wrote: >>> On Thursday, 10 February 2022 9:53:38 PM AEDT David Hildenbrand wrote: >>>> On 07.02.22 05:26, Alistair

Re: [PATCH v6 01/10] mm: add zone device coherent type memory support

2022-02-11 Thread David Hildenbrand
On 11.02.22 17:45, Jason Gunthorpe wrote: > On Fri, Feb 11, 2022 at 05:15:25PM +0100, David Hildenbrand wrote: > >> ... I'm pretty sure we cannot FOLL_PIN DEVICE_PRIVATE pages > > Currently the only way to get a DEVICE_PRIVATE page out of the page > tables is via

Re: [PATCH v6 01/10] mm: add zone device coherent type memory support

2022-02-11 Thread David Hildenbrand
On 11.02.22 17:15, David Hildenbrand wrote: > On 01.02.22 16:48, Alex Sierra wrote: >> Device memory that is cache coherent from device and CPU point of view. >> This is used on platforms that have an advanced system bus (like CAPI >> or CXL). Any page of a process can be mi

Re: [PATCH v6 01/10] mm: add zone device coherent type memory support

2022-02-11 Thread David Hildenbrand
On 01.02.22 16:48, Alex Sierra wrote: > Device memory that is cache coherent from device and CPU point of view. > This is used on platforms that have an advanced system bus (like CAPI > or CXL). Any page of a process can be migrated to such memory. However, > no one should be allowed to pin such me

Re: [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-10 Thread David Hildenbrand
On 10.02.22 12:39, Alistair Popple wrote: > On Thursday, 10 February 2022 9:53:38 PM AEDT David Hildenbrand wrote: >> On 07.02.22 05:26, Alistair Popple wrote: >>> Currently any attempts to pin a device coherent page will fail. This is >>> because device coherent pa

Re: [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-10 Thread David Hildenbrand
On 07.02.22 05:26, Alistair Popple wrote: > Currently any attempts to pin a device coherent page will fail. This is > because device coherent pages need to be managed by a device driver, and > pinning them would prevent a driver from migrating them off the device. > > However this is no reason to

Re: [PATCH v3 00/10] Add MEMORY_DEVICE_COHERENT for coherent device memory mapping

2022-01-12 Thread David Hildenbrand
On 10.01.22 23:31, Alex Sierra wrote: > This patch series introduces MEMORY_DEVICE_COHERENT, a type of memory > owned by a device that can be mapped into CPU page tables like > MEMORY_DEVICE_GENERIC and can also be migrated like > MEMORY_DEVICE_PRIVATE. > > Christoph, the suggestion to incorporate

Re: [PATCH RFC] virtio: wrap config->reset calls

2021-10-13 Thread David Hildenbrand
On 13.10.21 14:17, Michael S. Tsirkin wrote: > On Wed, Oct 13, 2021 at 01:03:46PM +0200, David Hildenbrand wrote: >> On 13.10.21 12:55, Michael S. Tsirkin wrote: >>> This will enable cleanups down the road. >>> The idea is to disable cbs, then add "flush_queued_

Re: [PATCH RFC] virtio: wrap config->reset calls

2021-10-13 Thread David Hildenbrand
On 13.10.21 12:55, Michael S. Tsirkin wrote: This will enable cleanups down the road. The idea is to disable cbs, then add "flush_queued_cbs" callback as a parameter, this way drivers can flush any work queued after callbacks have been disabled. Signed-off-by: Michael S. Tsirkin --- arch/um/d

Re: [PATCH v3] drivers: introduce and use WANT_DMA_CMA for soft dependencies on DMA_CMA

2021-04-12 Thread David Hildenbrand
On 12.04.21 15:12, Robin Murphy wrote: On 2021-04-09 14:39, David Hildenbrand wrote: On 09.04.21 15:35, Arnd Bergmann wrote: On Fri, Apr 9, 2021 at 1:21 PM David Hildenbrand wrote: Random drivers should not override a user configuration of core knobs (e.g., CONFIG_DMA_CMA=n). Applicable

Re: [PATCH v3] drivers: introduce and use WANT_DMA_CMA for soft dependencies on DMA_CMA

2021-04-09 Thread David Hildenbrand
On 09.04.21 15:35, Arnd Bergmann wrote: On Fri, Apr 9, 2021 at 1:21 PM David Hildenbrand wrote: Random drivers should not override a user configuration of core knobs (e.g., CONFIG_DMA_CMA=n). Applicable drivers would like to use DMA_CMA, which depends on CMA, if possible; however, these

[PATCH v3] drivers: introduce and use WANT_DMA_CMA for soft dependencies on DMA_CMA

2021-04-09 Thread David Hildenbrand
@lists.ozlabs.org Cc: linux-arm-ker...@lists.infradead.org Cc: etna...@lists.freedesktop.org Cc: linux-m...@vger.kernel.org Cc: linux-fb...@vger.kernel.org Cc: io...@lists.linux-foundation.org Signed-off-by: David Hildenbrand --- Let's see if this approach is better for soft dependencies (an

Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv

2021-04-09 Thread David Hildenbrand
On 08.04.21 22:29, Arnd Bergmann wrote: On Thu, Apr 8, 2021 at 6:45 PM David Hildenbrand wrote: On 08.04.21 14:49, Linus Walleij wrote: On Thu, Apr 8, 2021 at 2:01 PM David Hildenbrand wrote: This is something you could do using a hidden helper symbol like config DRMA_ASPEED_GFX

Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv

2021-04-09 Thread David Hildenbrand
On 08.04.21 15:19, Arnd Bergmann wrote: On Thu, Apr 8, 2021 at 2:50 PM Linus Walleij wrote: On Thu, Apr 8, 2021 at 2:01 PM David Hildenbrand wrote: This is something you could do using a hidden helper symbol like config DRMA_ASPEED_GFX bool "Aspeed display driver"

Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv

2021-04-08 Thread David Hildenbrand
On 08.04.21 14:49, Linus Walleij wrote: On Thu, Apr 8, 2021 at 2:01 PM David Hildenbrand wrote: This is something you could do using a hidden helper symbol like config DRMA_ASPEED_GFX bool "Aspeed display driver" select DRM_WANT_CMA config DRM_WANT_CMA

Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv

2021-04-08 Thread David Hildenbrand
On 08.04.21 13:44, Arnd Bergmann wrote: On Thu, Apr 8, 2021 at 1:00 PM David Hildenbrand wrote: It is a somewhat awkward way to say "prevent this symbol from being =y if the dependency is =m". What would be the right thing to do in the case here then to achieve the "if DRM

Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv

2021-04-08 Thread David Hildenbrand
In particular, it does not prevent a configuration with 'DRM_CMA=m' I assume you meant "DRM_CMA=n" ? DRM_CMA cannot be built as a module. Ok, at least that makes it easier. and 'DRMA_ASPEED_GFX=y', or any build failures from such a configuration. I don't follow. "DRM_CMA=n" and 'DRMA_ASPEE

Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv

2021-04-08 Thread David Hildenbrand
On 08.04.21 12:27, David Hildenbrand wrote: On 08.04.21 12:20, Arnd Bergmann wrote: On Thu, Apr 8, 2021 at 11:22 AM David Hildenbrand wrote: Random drivers should not override a user configuration of core knobs (e.g., CONFIG_DMA_CMA=n). Use "imply" instead, to still respect depend

Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv

2021-04-08 Thread David Hildenbrand
On 08.04.21 12:20, Arnd Bergmann wrote: On Thu, Apr 8, 2021 at 11:22 AM David Hildenbrand wrote: Random drivers should not override a user configuration of core knobs (e.g., CONFIG_DMA_CMA=n). Use "imply" instead, to still respect dependencies and manual overrides. "Thi

[PATCH v2 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv

2021-04-08 Thread David Hildenbrand
ork without CMA just fine -- esp. when we wouldn't have HAVE_DMA_CONTIGUOUS right now. Signed-off-by: David Hildenbrand --- drivers/gpu/drm/aspeed/Kconfig | 3 +-- drivers/gpu/drm/etnaviv/Kconfig | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/aspeed

[PATCH v2 1/2] drivers/video/fbdev: don't select DMA_CMA

2021-04-08 Thread David Hildenbrand
ork without CMA just fine -- esp. when we wouldn't have HAVE_DMA_CONTIGUOUS or CMA right now. Signed-off-by: David Hildenbrand --- drivers/video/fbdev/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index

[PATCH v2 0/2] drivers: don't select DMA_CMA or CMA

2021-04-08 Thread David Hildenbrand
Cc: Randy Dunlap Cc: Peter Collingbourne Cc: linux-asp...@lists.ozlabs.org Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-ker...@lists.infradead.org Cc: etna...@lists.freedesktop.org Cc: linux-fb...@vger.kernel.org David Hildenbrand (2): drivers/video/fbdev: don't select DMA_CMA dri

Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv

2021-04-08 Thread David Hildenbrand
On 08.04.21 11:56, Mike Rapoport wrote: On Thu, Apr 08, 2021 at 11:20:11AM +0200, David Hildenbrand wrote: Random drivers should not override a user configuration of core knobs (e.g., CONFIG_DMA_CMA=n). Use "imply" instead, to still respect dependencies and manual overrides. "

[PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv

2021-04-08 Thread David Hildenbrand
ork without CMA just fine -- esp. when we wouldn't have HAVE_DMA_CONTIGUOUS right now. Signed-off-by: David Hildenbrand --- drivers/gpu/drm/aspeed/Kconfig | 3 +-- drivers/gpu/drm/etnaviv/Kconfig | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/aspeed

[PATCH v1 1/2] drivers/video/fbdev: don't select DMA_CMA

2021-04-08 Thread David Hildenbrand
ork without CMA just fine -- esp. when we wouldn't have HAVE_DMA_CONTIGUOUS or CMA right now. Signed-off-by: David Hildenbrand --- drivers/video/fbdev/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index

[PATCH v1 0/2] drivers: don't select DMA_CMA or CMA

2021-04-08 Thread David Hildenbrand
Cc: linux-asp...@lists.ozlabs.org Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-ker...@lists.infradead.org Cc: etna...@lists.freedesktop.org Cc: linux-fb...@vger.kernel.org David Hildenbrand (2): drivers/video/fbdev: don't select DMA_CMA drivers/gpu/drm: don't select DMA_CMA or C

Re: [PATCH 5/9] vmw_balloon: remove the balloon-vmware file system

2021-03-09 Thread David Hildenbrand
On 09.03.21 16:53, Christoph Hellwig wrote: Just use the generic anon_inode file system. Signed-off-by: Christoph Hellwig --- drivers/misc/vmw_balloon.c | 24 ++-- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw

Re: [PATCH 6/9] virtio_balloon: remove the balloon-kvm file system

2021-03-09 Thread David Hildenbrand
On 09.03.21 16:53, Christoph Hellwig wrote: Just use the generic anon_inode file system. Signed-off-by: Christoph Hellwig --- drivers/virtio/virtio_balloon.c | 30 +++--- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/drivers/virtio/virtio_balloon.c b/

Re: [PATCH 3/9] powerpc/pseries: remove the ppc-cmm file system

2021-03-09 Thread David Hildenbrand
On 09.03.21 16:53, Christoph Hellwig wrote: Just use the generic anon_inode file system. Signed-off-by: Christoph Hellwig --- arch/powerpc/platforms/pseries/cmm.c | 27 ++- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/arch/powerpc/platforms/pseries/c

Re: [PATCH 2/9] fs: add an argument-less alloc_anon_inode

2021-03-09 Thread David Hildenbrand
void *priv, int flags, const struct inode *context_inode); +struct inode *alloc_anon_inode(void); #endif /* _LINUX_ANON_INODES_H */ Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH 1/9] fs: rename alloc_anon_inode to alloc_anon_inode_sb

2021-03-09 Thread David Hildenbrand
loc_anon_inode(zsmalloc_mnt->mnt_sb); + pool->inode = alloc_anon_inode_sb(zsmalloc_mnt->mnt_sb); if (IS_ERR(pool->inode)) { pool->inode = NULL; return 1; Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v1 2/2] mm: simplify free_highmem_page() and free_reserved_page()

2021-01-27 Thread David Hildenbrand
On 27.01.21 12:51, Oscar Salvador wrote: On Tue, Jan 26, 2021 at 07:21:13PM +0100, David Hildenbrand wrote: adjust_managed_page_count() as called by free_reserved_page() properly handles pages in a highmem zone, so we can reuse it for free_highmem_page(). We can now get rid of

[PATCH v1 2/2] mm: simplify free_highmem_page() and free_reserved_page()

2021-01-26 Thread David Hildenbrand
Intel)" Cc: Mike Rapoport Cc: Oscar Salvador Cc: Michal Hocko Cc: Wei Yang Signed-off-by: David Hildenbrand --- include/linux/highmem-internal.h | 5 - include/linux/mm.h | 16 ++-- mm/page_alloc.c | 11 --- 3 files changed, 2 inserti

[PATCH v1 0/2] mm: simplify free_highmem_page() and free_reserved_page()

2021-01-26 Thread David Hildenbrand
Let's simplify and unify free_highmem_page() and free_reserved_page(). Gave it a quick test in i386 QEMU with 4G of RAM - seems to work just fine. David Hildenbrand (2): video: fbdev: acornfb: remove free_unused_pages() mm: simplify free_highmem_page() and free_reserved_page() dr

[PATCH v1 1/2] video: fbdev: acornfb: remove free_unused_pages()

2021-01-26 Thread David Hildenbrand
. R. Silva" Cc: Sam Ravnborg Signed-off-by: David Hildenbrand --- drivers/video/fbdev/acornfb.c | 34 -- 1 file changed, 34 deletions(-) diff --git a/drivers/video/fbdev/acornfb.c b/drivers/video/fbdev/acornfb.c index bcc92aecf666..1b72edc01cfb 100644 --- a/driv

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

2020-09-25 Thread David Hildenbrand
On 24.09.20 23:50, Dan Williams wrote: > 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

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

2020-09-24 Thread David Hildenbrand
> 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 to add_memory_driver_managed(). >> >> I'm afraid I don't get your point. For virtio-mem: >> >> Before: >> >> 1. Create virtio0 cont

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

2020-09-24 Thread David Hildenbrand
On 24.09.20 15:54, Dan Williams wrote: > 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 M

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

2020-09-24 Thread David Hildenbrand
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 response] >>> >>> On 8/21/20 11:06 AM, David Hildenbrand wrote: >>>> O

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

2020-09-23 Thread David Hildenbrand
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 +45,94 @@ int dev_dax_kmem_probe(struct device *dev) >>> * could be mixed in a

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

2020-09-08 Thread David Hildenbrand
>>> + release_mem_region(range.start, range_len(&range)); >> >> remove_memory() does a release_mem_region_adjustable(). Don't you >> actually want to release the *unaligned* region you requested? >> > Isn't it what we're doing here? > (The release_mem_region_adjustable() is using the same

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

2020-09-08 Thread David Hildenbrand
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. >> >> No worries, also bear with me, I'm going to be offline intermittently >> until at least mid-September. Hopefully Joao and/or Vi

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

2020-08-21 Thread David Hildenbrand
> Am 21.08.2020 um 23:34 schrieb David Hildenbrand : > >  > >>> Am 21.08.2020 um 23:17 schrieb Dan Williams : >>> >>> On Fri, Aug 21, 2020 at 11:30 AM David Hildenbrand >>> wrote: >>> >>>> On 21.08.20 20:27, Dan W

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

2020-08-21 Thread David Hildenbrand
> Am 21.08.2020 um 23:34 schrieb David Hildenbrand : > >  > >>> Am 21.08.2020 um 23:17 schrieb Dan Williams : >>> >>> On Fri, Aug 21, 2020 at 11:30 AM David Hildenbrand >>> wrote: >>> >>>> On 21.08.20 20:27, Dan W

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

2020-08-21 Thread David Hildenbrand
On 21.08.20 23:33, David Hildenbrand wrote: > > >> Am 21.08.2020 um 23:17 schrieb Dan Williams : >> >> On Fri, Aug 21, 2020 at 11:30 AM David Hildenbrand wrote: >>> >>>> On 21.08.20 20:27, Dan Williams wrote: >>>>

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

2020-08-21 Thread David Hildenbrand
> Am 21.08.2020 um 23:17 schrieb 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: >>>> >>>>>&

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

2020-08-21 Thread David Hildenbrand
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" memory. This memory is not >>>> automatically used in the buddy during boot, but remai

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

2020-08-21 Thread David Hildenbrand
>> >> 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 on arm64 (-e820), correct? > > Correct, arm64 also gets the EFI suppor

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

2020-08-21 Thread David Hildenbrand
On 03.08.20 07:03, Dan Williams wrote: > Several related issues around this unneeded attribute: > > - The dax_kmem_res property allows the kmem driver to stash the adjusted > resource range that was used for the hotplug operation, but that can be > recalculated from the original base range. >

Re: [PATCH 2/3] dma-buf: heaps: add chunk heap to dmabuf heaps

2020-08-18 Thread David Hildenbrand
On 18.08.20 10:04, Hyesoo Yu wrote: > This patch adds support for a chunk heap that allows for buffers > that are made up of a list of fixed size chunks taken from a CMA. > Chunk sizes are configuratd when the heaps are created. > > Signed-off-by: Hyesoo Yu > --- > drivers/dma-buf/heaps/Kconfig

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

2020-08-03 Thread David Hildenbrand
[...] > 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 is the fault of the platform firmware to populate all > the necessary NUMA

Re: [PATCH v2 4/4] xen: add helpers to allocate unpopulated memory

2020-07-27 Thread David Hildenbrand
On 24.07.20 18:36, Boris Ostrovsky wrote: > On 7/24/20 10:34 AM, David Hildenbrand wrote: >> CCing Dan >> >> On 24.07.20 14:42, Roger Pau Monne wrote: >>> diff --git a/drivers/xen/unpopulated-alloc.c >>> b/drivers/xen/unpopulated-alloc.c >>

Re: [PATCH v2 4/4] xen: add helpers to allocate unpopulated memory

2020-07-24 Thread David Hildenbrand
Cc: Stefano Stabellini > Cc: Dan Carpenter > Cc: Roger Pau Monne > Cc: Wei Liu > Cc: Yan Yankovskyi > Cc: dri-devel@lists.freedesktop.org > Cc: xen-de...@lists.xenproject.org > Cc: linux...@kvack.org > Cc: David Hildenbrand > Cc: Michal Hocko > --- > drivers/gpu/drm/xen/xen_drm

<    1   2   3   >