Displaying 3 results from an estimated 3 matches for "page_ref_add_unless".
2020 Oct 12
2
[PATCH v2] mm/hmm: make device private reference counts zero based
...vice private memcg accounting")
https://lore.kernel.org/linux-mm/20201009215952.2726-1-rcampbell at nvidia.com
but doesn't really depend on them, just simple merge conflicts
without them.
This is for Andrew Morton after the 5.10.0-rc1 merge window closes.
Changes in v2:
Fixed the call to page_ref_add_unless() when moving a process from one
memory cgroup to another thanks to Ira Weiny's comment.
arch/powerpc/kvm/book3s_hv_uvmem.c | 13 +++++++-
drivers/gpu/drm/nouveau/nouveau_dmem.c | 2 +-
include/linux/memremap.h | 6 ++--
include/linux/mm.h | 9 +-----...
2020 Oct 08
2
[PATCH] mm: make device private reference counts zero based
ZONE_DEVICE struct pages have an extra reference count that complicates the
code for put_page() and several places in the kernel that need to check the
reference count to see that a page is not being used (gup, compaction,
migration, etc.). Clean up the code so the reference count doesn't need to
be treated specially for device private pages, leaving DAX as still being
a special case.
2020 Oct 09
0
[PATCH] mm: make device private reference counts zero based
...se.
What about the check in mc_handle_swap_pte()?
mm/memcontrol.c:
5513 /*
5514 * MEMORY_DEVICE_PRIVATE means ZONE_DEVICE page and which have
5515 * a refcount of 1 when free (unlike normal page)
5516 */
5517 if (!page_ref_add_unless(page, 1, 1))
5518 return NULL;
... does that need to change? Perhaps just the comment?
>
> Signed-off-by: Ralph Campbell <rcampbell at nvidia.com>
> ---
>
[snip]
>
> void put_devmap_managed_page(struct page *page);
> diff --git a/lib/test...