search for: free_zone_device_page

Displaying 11 results from an estimated 11 matches for "free_zone_device_page".

2020 Sep 16
0
[PATCH] mm: remove extra ZONE_DEVICE struct page refcount
...+ default: > + break; > + } > +} > +#else > +static inline void __put_devmap_managed_page(struct page *page) > +{ > +} > +#endif I think this should be moved to mm/memremap.c or even better actually be folded into free_devmap_managed_page, which would need a new name like free_zone_device_page(). Something like this incremental patch: diff --git a/include/linux/mm.h b/include/linux/mm.h index 7bb9e93cf86cde..29350dc27cd0cd 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1090,11 +1090,6 @@ static inline bool is_zone_device_page(const struct page *page) } #endif -#ifdef...
2020 Sep 17
0
[PATCH] mm: remove extra ZONE_DEVICE struct page refcount
...+} >> +#else >> +static inline void __put_devmap_managed_page(struct page *page) >> +{ >> +} >> +#endif > > I think this should be moved to mm/memremap.c or even better > actually be folded into free_devmap_managed_page, which would need > a new name like free_zone_device_page(). > > Something like this incremental patch: > > > diff --git a/include/linux/mm.h b/include/linux/mm.h > index 7bb9e93cf86cde..29350dc27cd0cd 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -1090,11 +1090,6 @@ static inline bool is_zone_device_page(...
2020 Sep 14
5
[PATCH] mm: remove extra ZONE_DEVICE struct page refcount
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 ZONE_DEVICE. Signed-off-by: Ralph Campbell <rcampbell at
2020 Oct 08
2
[PATCH] mm: make device private reference counts zero based
...nit_page_count(dpage); lock_page(dpage); return dpage; diff --git a/mm/internal.h b/mm/internal.h index c43ccdddb0f6..e1443b73aa9b 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -618,4 +618,12 @@ struct migration_target_control { gfp_t gfp_mask; }; +#ifdef CONFIG_DEV_PAGEMAP_OPS +void free_zone_device_page(struct page *page); +#else +static inline void free_zone_device_page(struct page *page) +{ +} +#endif + #endif /* __MM_INTERNAL_H */ diff --git a/mm/memremap.c b/mm/memremap.c index 504a10ff2edf..a163a9e36e56 100644 --- a/mm/memremap.c +++ b/mm/memremap.c @@ -49,12 +49,6 @@ static void devmap_mana...
2020 Oct 12
2
[PATCH v2] mm/hmm: make device private reference counts zero based
...nit_page_count(dpage); lock_page(dpage); return dpage; diff --git a/mm/internal.h b/mm/internal.h index c43ccdddb0f6..e1443b73aa9b 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -618,4 +618,12 @@ struct migration_target_control { gfp_t gfp_mask; }; +#ifdef CONFIG_DEV_PAGEMAP_OPS +void free_zone_device_page(struct page *page); +#else +static inline void free_zone_device_page(struct page *page) +{ +} +#endif + #endif /* __MM_INTERNAL_H */ diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 3a24e3b619f5..affab09fe35e 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5553,17 +5553,12 @@ static str...
2020 Sep 25
0
[PATCH 2/2] mm: remove extra ZONE_DEVICE struct page refcount
...ount_available(page)) hpage_pincount_sub(page, 1); else diff --git a/mm/internal.h b/mm/internal.h index 10c677655912..c9de39ad5f52 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -620,4 +620,12 @@ struct migration_target_control { gfp_t gfp_mask; }; +#ifdef CONFIG_DEV_PAGEMAP_OPS +void free_zone_device_page(struct page *page); +#else +static inline void free_zone_device_page(struct page *page) +{ +} +#endif + #endif /* __MM_INTERNAL_H */ diff --git a/mm/memremap.c b/mm/memremap.c index 006dace60b1a..961e09b20543 100644 --- a/mm/memremap.c +++ b/mm/memremap.c @@ -12,6 +12,7 @@ #include <linux/type...
2020 Oct 01
0
[RFC PATCH v3 2/2] mm: remove extra ZONE_DEVICE struct page refcount
...ount_available(page)) hpage_pincount_sub(page, 1); else diff --git a/mm/internal.h b/mm/internal.h index 6345b08ce86c..629959a6f26d 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -618,4 +618,12 @@ struct migration_target_control { gfp_t gfp_mask; }; +#ifdef CONFIG_DEV_PAGEMAP_OPS +void free_zone_device_page(struct page *page); +#else +static inline void free_zone_device_page(struct page *page) +{ +} +#endif + #endif /* __MM_INTERNAL_H */ diff --git a/mm/memremap.c b/mm/memremap.c index 2bb276680837..336f088c92a1 100644 --- a/mm/memremap.c +++ b/mm/memremap.c @@ -12,6 +12,7 @@ #include <linux/type...
2020 Sep 25
6
[RFC PATCH v2 0/2] mm: remove extra ZONE_DEVICE struct page refcount
Matthew Wilcox, Ira Weiny, and others have complained that ZONE_DEVICE struct page reference counting is ugly because they are "free" when the reference count is one instead of zero. This leads to explicit checks for ZONE_DEVICE pages in places like put_page(), GUP, THP splitting, and page migration which have to adjust the expected reference count when determining if the page is
2020 Oct 01
8
[RFC PATCH v3 0/2] mm: remove extra ZONE_DEVICE struct page refcount
This is still an RFC because after looking at the pmem/dax code some more, I realized that the ZONE_DEVICE struct pages are being inserted into the process' page tables with vmf_insert_mixed() and a zero refcount on the ZONE_DEVICE struct page. This is sort of OK because insert_pfn() increments the reference count on the pgmap which is what prevents memunmap_pages() from freeing the struct
2020 Oct 09
0
[PATCH] mm: make device private reference counts zero based
...age(struct page *page) > void __put_page(struct page *page) > { > if (is_zone_device_page(page)) { > - put_dev_pagemap(page->pgmap); > - > /* > * The page belongs to the device that created pgmap. Do > * not return it to page allocator. > */ > + free_zone_device_page(page); I really like this. Ira
2020 Oct 12
0
[PATCH v2] mm/hmm: make device private reference counts zero based
...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. Please no half-step to removing the special casing... [..] > +void free_zone_device_page(struct page *page) > +{ > + if (!is_device_private_page(page)) > return; That seems too subtle to be acceptable to me. All ZONE_DEVICE pages need to have the same relationship with respect to idle-ness and the page reference count.