search for: populated_zon

Displaying 20 results from an estimated 32 matches for "populated_zon".

Did you mean: populated_zone
2017 Aug 08
2
[virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks
...was to simply >> walk free lists of the suitable order and call the callback for each >> one. >> Something as simple as >> >> for (i = 0; i < MAX_NR_ZONES; i++) { >> struct zone *zone = &pgdat->node_zones[i]; >> >> if (!populated_zone(zone)) >> continue; > > Can we directly use for_each_populated_zone(zone) here? > > >> spin_lock_irqsave(&zone->lock, flags); >> for (order = min_order; order < MAX_ORDER; ++order) { > > > This appears to be covered by for_each_m...
2017 Aug 08
2
[virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks
...was to simply >> walk free lists of the suitable order and call the callback for each >> one. >> Something as simple as >> >> for (i = 0; i < MAX_NR_ZONES; i++) { >> struct zone *zone = &pgdat->node_zones[i]; >> >> if (!populated_zone(zone)) >> continue; > > Can we directly use for_each_populated_zone(zone) here? > > >> spin_lock_irqsave(&zone->lock, flags); >> for (order = min_order; order < MAX_ORDER; ++order) { > > > This appears to be covered by for_each_m...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...at I've had in mind was to simply > >walk free lists of the suitable order and call the callback for each one. > >Something as simple as > > > > for (i = 0; i < MAX_NR_ZONES; i++) { > > struct zone *zone = &pgdat->node_zones[i]; > > > > if (!populated_zone(zone)) > > continue; > > spin_lock_irqsave(&zone->lock, flags); > > for (order = min_order; order < MAX_ORDER; ++order) { > > struct free_area *free_area = &zone->free_area[order]; > > enum migratetype mt; > > struct page *page; > &...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...at I've had in mind was to simply > >walk free lists of the suitable order and call the callback for each one. > >Something as simple as > > > > for (i = 0; i < MAX_NR_ZONES; i++) { > > struct zone *zone = &pgdat->node_zones[i]; > > > > if (!populated_zone(zone)) > > continue; > > spin_lock_irqsave(&zone->lock, flags); > > for (order = min_order; order < MAX_ORDER; ++order) { > > struct free_area *free_area = &zone->free_area[order]; > > enum migratetype mt; > > struct page *page; > &...
2017 Aug 03
4
[PATCH v13 4/5] mm: support reporting free page blocks
...r provide struct page pointers outside of the zone->lock. What I've had in mind was to simply walk free lists of the suitable order and call the callback for each one. Something as simple as for (i = 0; i < MAX_NR_ZONES; i++) { struct zone *zone = &pgdat->node_zones[i]; if (!populated_zone(zone)) continue; spin_lock_irqsave(&zone->lock, flags); for (order = min_order; order < MAX_ORDER; ++order) { struct free_area *free_area = &zone->free_area[order]; enum migratetype mt; struct page *page; if (!free_area->nr_pages) continue; for_each_...
2017 Aug 03
4
[PATCH v13 4/5] mm: support reporting free page blocks
...r provide struct page pointers outside of the zone->lock. What I've had in mind was to simply walk free lists of the suitable order and call the callback for each one. Something as simple as for (i = 0; i < MAX_NR_ZONES; i++) { struct zone *zone = &pgdat->node_zones[i]; if (!populated_zone(zone)) continue; spin_lock_irqsave(&zone->lock, flags); for (order = min_order; order < MAX_ORDER; ++order) { struct free_area *free_area = &zone->free_area[order]; enum migratetype mt; struct page *page; if (!free_area->nr_pages) continue; for_each_...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...alk free lists of the suitable order and call the callback for each one. > >>>Something as simple as > >>> > >>> for (i = 0; i < MAX_NR_ZONES; i++) { > >>> struct zone *zone = &pgdat->node_zones[i]; > >>> > >>> if (!populated_zone(zone)) > >>> continue; > >>> spin_lock_irqsave(&zone->lock, flags); > >>> for (order = min_order; order < MAX_ORDER; ++order) { > >>> struct free_area *free_area = &zone->free_area[order]; > >>> enum migratetype m...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...alk free lists of the suitable order and call the callback for each one. > >>>Something as simple as > >>> > >>> for (i = 0; i < MAX_NR_ZONES; i++) { > >>> struct zone *zone = &pgdat->node_zones[i]; > >>> > >>> if (!populated_zone(zone)) > >>> continue; > >>> spin_lock_irqsave(&zone->lock, flags); > >>> for (order = min_order; order < MAX_ORDER; ++order) { > >>> struct free_area *free_area = &zone->free_area[order]; > >>> enum migratetype m...
2017 Aug 10
1
[virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks
...order and call the callback for each >>>> one. >>>> Something as simple as >>>> >>>> for (i = 0; i < MAX_NR_ZONES; i++) { >>>> struct zone *zone = &pgdat->node_zones[i]; >>>> >>>> if (!populated_zone(zone)) >>>> continue; >>> Can we directly use for_each_populated_zone(zone) here? > yes, my example couldn't because I was still assuming per-node API > >>>> spin_lock_irqsave(&zone->lock, flags); >>>> for (order = m...
2017 Aug 10
1
[virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks
...order and call the callback for each >>>> one. >>>> Something as simple as >>>> >>>> for (i = 0; i < MAX_NR_ZONES; i++) { >>>> struct zone *zone = &pgdat->node_zones[i]; >>>> >>>> if (!populated_zone(zone)) >>>> continue; >>> Can we directly use for_each_populated_zone(zone) here? > yes, my example couldn't because I was still assuming per-node API > >>>> spin_lock_irqsave(&zone->lock, flags); >>>> for (order = m...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...e callback for each one. > >>>>>Something as simple as > >>>>> > >>>>> for (i = 0; i < MAX_NR_ZONES; i++) { > >>>>> struct zone *zone = &pgdat->node_zones[i]; > >>>>> > >>>>> if (!populated_zone(zone)) > >>>>> continue; > >>>>> spin_lock_irqsave(&zone->lock, flags); > >>>>> for (order = min_order; order < MAX_ORDER; ++order) { > >>>>> struct free_area *free_area = &zone->free_area[order]; > &...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...e callback for each one. > >>>>>Something as simple as > >>>>> > >>>>> for (i = 0; i < MAX_NR_ZONES; i++) { > >>>>> struct zone *zone = &pgdat->node_zones[i]; > >>>>> > >>>>> if (!populated_zone(zone)) > >>>>> continue; > >>>>> spin_lock_irqsave(&zone->lock, flags); > >>>>> for (order = min_order; order < MAX_ORDER; ++order) { > >>>>> struct free_area *free_area = &zone->free_area[order]; > &...
2017 Jul 14
4
[PATCH v12 6/8] mm: support reporting free page blocks
...ruct list_head *this_list; > + int ret = 0; > + unsigned long flags; > + > + /* Sanity check */ > + if (zone == NULL || page == NULL || order >= MAX_ORDER || > + migratetype >= MIGRATE_TYPES) > + return -EINVAL; > + > + /* Zone validity check */ > + for_each_populated_zone(this_zone) { > + if (zone == this_zone) > + break; > + } > + > + /* Got a non-existent zone from the caller? */ > + if (zone != this_zone) > + return -EINVAL; Huh, what do you check for here? Why don't you simply populated_zone(zone)? > + > + spin_lock_irqsave(...
2017 Jul 14
4
[PATCH v12 6/8] mm: support reporting free page blocks
...ruct list_head *this_list; > + int ret = 0; > + unsigned long flags; > + > + /* Sanity check */ > + if (zone == NULL || page == NULL || order >= MAX_ORDER || > + migratetype >= MIGRATE_TYPES) > + return -EINVAL; > + > + /* Zone validity check */ > + for_each_populated_zone(this_zone) { > + if (zone == this_zone) > + break; > + } > + > + /* Got a non-existent zone from the caller? */ > + if (zone != this_zone) > + return -EINVAL; Huh, what do you check for here? Why don't you simply populated_zone(zone)? > + > + spin_lock_irqsave(...
2013 May 26
6
[PATCH v8, part3 12/14] mm: correctly update zone->mamaged_pages
...; zone->present_pages -= offlined_pages; pgdat_resize_lock(zone->zone_pgdat, &flags); zone->zone_pgdat->node_present_pages -= offlined_pages; pgdat_resize_unlock(zone->zone_pgdat, &flags); - totalram_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_pa...
2013 May 26
6
[PATCH v8, part3 12/14] mm: correctly update zone->mamaged_pages
...; zone->present_pages -= offlined_pages; pgdat_resize_lock(zone->zone_pgdat, &flags); zone->zone_pgdat->node_present_pages -= offlined_pages; pgdat_resize_unlock(zone->zone_pgdat, &flags); - totalram_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_pa...
2013 May 26
6
[PATCH v8, part3 12/14] mm: correctly update zone->mamaged_pages
...; zone->present_pages -= offlined_pages; pgdat_resize_lock(zone->zone_pgdat, &flags); zone->zone_pgdat->node_present_pages -= offlined_pages; pgdat_resize_unlock(zone->zone_pgdat, &flags); - totalram_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_pa...
2017 Aug 03
0
[PATCH v13 4/5] mm: support reporting free page blocks
...s to simply >>> walk free lists of the suitable order and call the callback for each one. >>> Something as simple as >>> >>> for (i = 0; i < MAX_NR_ZONES; i++) { >>> struct zone *zone = &pgdat->node_zones[i]; >>> >>> if (!populated_zone(zone)) >>> continue; >>> spin_lock_irqsave(&zone->lock, flags); >>> for (order = min_order; order < MAX_ORDER; ++order) { >>> struct free_area *free_area = &zone->free_area[order]; >>> enum migratetype mt; >>> s...
2017 Aug 08
0
[PATCH v13 4/5] mm: support reporting free page blocks
...tside of the zone->lock. What I've had in mind was to simply > walk free lists of the suitable order and call the callback for each one. > Something as simple as > > for (i = 0; i < MAX_NR_ZONES; i++) { > struct zone *zone = &pgdat->node_zones[i]; > > if (!populated_zone(zone)) > continue; Can we directly use for_each_populated_zone(zone) here? > spin_lock_irqsave(&zone->lock, flags); > for (order = min_order; order < MAX_ORDER; ++order) { This appears to be covered by for_each_migratetype_order(order, mt) below. > struct fre...
2017 Aug 10
0
[virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks
...free lists of the suitable order and call the callback for each > >>one. > >>Something as simple as > >> > >> for (i = 0; i < MAX_NR_ZONES; i++) { > >> struct zone *zone = &pgdat->node_zones[i]; > >> > >> if (!populated_zone(zone)) > >> continue; > > > >Can we directly use for_each_populated_zone(zone) here? yes, my example couldn't because I was still assuming per-node API > >>spin_lock_irqsave(&zone->lock, flags); > >> for (order = min_order; orde...