search for: set_page_refcount

Displaying 16 results from an estimated 16 matches for "set_page_refcount".

Did you mean: set_page_refcounted
2020 Sep 14
2
[PATCH] mm: remove extra ZONE_DEVICE struct page refcount
...e drivers to expect that the page is already refcount==0 on > entry? Seems odd to go through all this trouble to make the reference > count appear to be zero to the wider kernel but expect that drivers > get a fake reference on entry to their ->page_free() callbacks. Good point. Since set_page_refcounted() is defined in mm_interal.h I would have to move the definition to someplace like page_ref.h or have the drivers cal init_page_count() or set_page_count() since get_page() calls VM_BUG_ON_PAGE() if refcount == 0. I'll move set_page_refcounted() since that is what the page allocator uses and...
2020 Sep 15
0
[PATCH] mm: remove extra ZONE_DEVICE struct page refcount
On Mon, Sep 14, 2020 at 04:53:25PM -0700, Ralph Campbell wrote: > Since set_page_refcounted() is defined in mm_interal.h I would have to > move the definition to someplace like page_ref.h or have the drivers > cal init_page_count() or set_page_count() since get_page() calls > VM_BUG_ON_PAGE() if refcount == 0. > I'll move set_page_refcounted() since that is what the page...
2020 Sep 15
2
[PATCH] mm: remove extra ZONE_DEVICE struct page refcount
On 9/15/20 9:29 AM, Christoph Hellwig wrote: > On Mon, Sep 14, 2020 at 04:53:25PM -0700, Ralph Campbell wrote: >> Since set_page_refcounted() is defined in mm_interal.h I would have to >> move the definition to someplace like page_ref.h or have the drivers >> cal init_page_count() or set_page_count() since get_page() calls >> VM_BUG_ON_PAGE() if refcount == 0. >> I'll move set_page_refcounted() since that...
2013 May 26
6
[PATCH v8, part3 12/14] mm: correctly update zone->mamaged_pages
...otalram_pages -= offlined_pages; - init_per_zone_wmark_min(); if (!populated_zone(zone)) { diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 403afa6..5b27db4 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -783,11 +783,7 @@ void __init init_cma_reserved_pageblock(struct page *page) set_page_refcounted(page); set_pageblock_migratetype(page, MIGRATE_CMA); __free_pages(page, pageblock_order); - totalram_pages += pageblock_nr_pages; -#ifdef CONFIG_HIGHMEM - if (PageHighMem(page)) - totalhigh_pages += pageblock_nr_pages; -#endif + adjust_managed_page_count(page, pageblock_nr_pages); } #endif...
2013 May 26
6
[PATCH v8, part3 12/14] mm: correctly update zone->mamaged_pages
...otalram_pages -= offlined_pages; - init_per_zone_wmark_min(); if (!populated_zone(zone)) { diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 403afa6..5b27db4 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -783,11 +783,7 @@ void __init init_cma_reserved_pageblock(struct page *page) set_page_refcounted(page); set_pageblock_migratetype(page, MIGRATE_CMA); __free_pages(page, pageblock_order); - totalram_pages += pageblock_nr_pages; -#ifdef CONFIG_HIGHMEM - if (PageHighMem(page)) - totalhigh_pages += pageblock_nr_pages; -#endif + adjust_managed_page_count(page, pageblock_nr_pages); } #endif...
2013 May 26
6
[PATCH v8, part3 12/14] mm: correctly update zone->mamaged_pages
...otalram_pages -= offlined_pages; - init_per_zone_wmark_min(); if (!populated_zone(zone)) { diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 403afa6..5b27db4 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -783,11 +783,7 @@ void __init init_cma_reserved_pageblock(struct page *page) set_page_refcounted(page); set_pageblock_migratetype(page, MIGRATE_CMA); __free_pages(page, pageblock_order); - totalram_pages += pageblock_nr_pages; -#ifdef CONFIG_HIGHMEM - if (PageHighMem(page)) - totalhigh_pages += pageblock_nr_pages; -#endif + adjust_managed_page_count(page, pageblock_nr_pages); } #endif...
2013 May 11
0
[PATCH v6, part3 13/16] mm: correctly update zone->mamaged_pages
...nt_pages -= offlined_pages; - totalram_pages -= offlined_pages; init_per_zone_wmark_min(); diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a07e70a..56b0097 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -780,11 +780,7 @@ void __init init_cma_reserved_pageblock(struct page *page) set_page_refcounted(page); set_pageblock_migratetype(page, MIGRATE_CMA); __free_pages(page, pageblock_order); - totalram_pages += pageblock_nr_pages; -#ifdef CONFIG_HIGHMEM - if (PageHighMem(page)) - totalhigh_pages += pageblock_nr_pages; -#endif + adjust_managed_page_count(page, pageblock_nr_pages); } #endif...
2013 May 11
0
[PATCH v6, part3 13/16] mm: correctly update zone->mamaged_pages
...nt_pages -= offlined_pages; - totalram_pages -= offlined_pages; init_per_zone_wmark_min(); diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a07e70a..56b0097 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -780,11 +780,7 @@ void __init init_cma_reserved_pageblock(struct page *page) set_page_refcounted(page); set_pageblock_migratetype(page, MIGRATE_CMA); __free_pages(page, pageblock_order); - totalram_pages += pageblock_nr_pages; -#ifdef CONFIG_HIGHMEM - if (PageHighMem(page)) - totalhigh_pages += pageblock_nr_pages; -#endif + adjust_managed_page_count(page, pageblock_nr_pages); } #endif...
2013 May 11
0
[PATCH v6, part3 13/16] mm: correctly update zone->mamaged_pages
...nt_pages -= offlined_pages; - totalram_pages -= offlined_pages; init_per_zone_wmark_min(); diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a07e70a..56b0097 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -780,11 +780,7 @@ void __init init_cma_reserved_pageblock(struct page *page) set_page_refcounted(page); set_pageblock_migratetype(page, MIGRATE_CMA); __free_pages(page, pageblock_order); - totalram_pages += pageblock_nr_pages; -#ifdef CONFIG_HIGHMEM - if (PageHighMem(page)) - totalhigh_pages += pageblock_nr_pages; -#endif + adjust_managed_page_count(page, pageblock_nr_pages); } #endif...
2020 Sep 14
5
[PATCH] mm: remove extra ZONE_DEVICE struct page refcount
...ct page *page) mem_cgroup_uncharge(page); + /* + * ZONE_DEVICE drivers keep a reference to the page while it is on + * the driver's free list so we reset the reference count here. + * This matches the initial reference when the struct pages are + * created by memremap_pages(). + */ + set_page_refcounted(page); + /* * When a device_private page is freed, the page->mapping field * may still contain a (stale) mapping value. For example, the diff --git a/mm/migrate.c b/mm/migrate.c index 4f89360d9e77..be1586582b52 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -380,11 +380,6 @@ static in...
2007 Apr 18
0
[patch 6/9] Guest page hinting: writable page table entries.
...<< PG_uptodate | 1 << PG_error | 1 << PG_readahead | 1 << PG_referenced | 1 << PG_arch_1 | - 1 << PG_fs_misc | 1 << PG_mappedtodisk); + 1 << PG_fs_misc | 1 << PG_mappedtodisk | + 1 << PG_writable ); set_page_private(page, 0); set_page_refcounted(page); kernel_map_pages(page, 1 << order, 1); diff -urpN linux-2.6/mm/page-discard.c linux-2.6-patched/mm/page-discard.c --- linux-2.6/mm/page-discard.c 2006-09-01 12:50:24.000000000 +0200 +++ linux-2.6-patched/mm/page-discard.c 2006-09-01 12:50:24.000000000 +0200 @@ -81,7 +81,7 @@ void _...
2007 Apr 18
0
[patch 6/9] Guest page hinting: writable page table entries.
...<< PG_uptodate | 1 << PG_error | 1 << PG_readahead | 1 << PG_referenced | 1 << PG_arch_1 | - 1 << PG_fs_misc | 1 << PG_mappedtodisk); + 1 << PG_fs_misc | 1 << PG_mappedtodisk | + 1 << PG_writable ); set_page_private(page, 0); set_page_refcounted(page); kernel_map_pages(page, 1 << order, 1); diff -urpN linux-2.6/mm/page-discard.c linux-2.6-patched/mm/page-discard.c --- linux-2.6/mm/page-discard.c 2006-09-01 12:50:24.000000000 +0200 +++ linux-2.6-patched/mm/page-discard.c 2006-09-01 12:50:24.000000000 +0200 @@ -81,7 +81,7 @@ void _...
2007 Jun 28
6
[patch 0/6] resend: guest page hinting version 5.
Greetings, after Carsten pitched CMM2 on the kvm mini summit here is a repost of version 5 of the guest page hinting patches. The code is still the same but has been adapted to the latest git level. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.
2007 Jun 28
6
[patch 0/6] resend: guest page hinting version 5.
Greetings, after Carsten pitched CMM2 on the kvm mini summit here is a repost of version 5 of the guest page hinting patches. The code is still the same but has been adapted to the latest git level. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.
2007 May 11
6
[patch 0/6] [rfc] guest page hinting version 5
After way to many months here is the fifth version of the guest page hinting patches. Compared to version four a few improvements have been added: - Avoid page_host_discards() calls outside of page-states.h - The discard list is now implemented via the page_free_discarded hook and architecture specific code. - PG_state_change page flag has been replaced with architecture specficic
2007 May 11
6
[patch 0/6] [rfc] guest page hinting version 5
After way to many months here is the fifth version of the guest page hinting patches. Compared to version four a few improvements have been added: - Avoid page_host_discards() calls outside of page-states.h - The discard list is now implemented via the page_free_discarded hook and architecture specific code. - PG_state_change page flag has been replaced with architecture specficic