search for: for_each_migratetype_ord

Displaying 20 results from an estimated 65 matches for "for_each_migratetype_ord".

2017 Aug 08
2
[virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks
...ulated_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 free_area *free_area = &zone->free_area[order]; >> enum migratetype mt; >> struct page *page; >> >> if (!free_area->nr_pages) >> continue; >...
2017 Aug 08
2
[virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks
...ulated_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 free_area *free_area = &zone->free_area[order]; >> enum migratetype mt; >> struct page *page; >> >> if (!free_area->nr_pages) >> continue; >...
2017 Aug 10
1
[virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks
..._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; order < MAX_ORDER; ++order) { >>> >>> This appears to be covered by for_each_migratetype_order(order, mt) below. > yes but > #define for_each_migratetype_order(order, type) \ > for (order = 0; order < MAX_ORDER; order++) \ > for (type = 0; type < MIGRATE_TYPES; type++) > > so you would have to skip orders < min_order Yes, that's why we have a new macro #...
2017 Aug 10
1
[virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks
..._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; order < MAX_ORDER; ++order) { >>> >>> This appears to be covered by for_each_migratetype_order(order, mt) below. > yes but > #define for_each_migratetype_order(order, type) \ > for (order = 0; order < MAX_ORDER; order++) \ > for (type = 0; type < MIGRATE_TYPES; type++) > > so you would have to skip orders < min_order Yes, that's why we have a new macro #...
2016 Jul 27
4
[PATCH v2 repost 6/7] mm: add the related functions to get free page info
On 07/26/2016 06:23 PM, Liang Li wrote: > + for_each_migratetype_order(order, t) { > + list_for_each(curr, &zone->free_area[order].free_list[t]) { > + pfn = page_to_pfn(list_entry(curr, struct page, lru)); > + if (pfn >= start_pfn && pfn <= end_pfn) { > + page_num = 1UL << order; > + if (pfn + page_num > end_pf...
2016 Jul 27
4
[PATCH v2 repost 6/7] mm: add the related functions to get free page info
On 07/26/2016 06:23 PM, Liang Li wrote: > + for_each_migratetype_order(order, t) { > + list_for_each(curr, &zone->free_area[order].free_list[t]) { > + pfn = page_to_pfn(list_entry(curr, struct page, lru)); > + if (pfn >= start_pfn && pfn <= end_pfn) { > + page_num = 1UL << order; > + if (pfn + page_num > end_pf...
2017 Aug 03
4
[PATCH v13 4/5] mm: support reporting free page blocks
...ndex fc14b8b..59eacf2 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -83,6 +83,11 @@ static inline bool is_migrate_movable(int mt) > for (order = 0; order < MAX_ORDER; order++) \ > for (type = 0; type < MIGRATE_TYPES; type++) > > +#define for_each_migratetype_order_decend(min_order, order, type) \ > + for (order = MAX_ORDER - 1; order < MAX_ORDER && order >= min_order; \ > + order--) \ > + for (type = 0; type < MIGRATE_TYPES; type++) > + Is there going to be any other user outside of mm/page_alloc.c? If not then do not ex...
2017 Aug 03
4
[PATCH v13 4/5] mm: support reporting free page blocks
...ndex fc14b8b..59eacf2 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -83,6 +83,11 @@ static inline bool is_migrate_movable(int mt) > for (order = 0; order < MAX_ORDER; order++) \ > for (type = 0; type < MIGRATE_TYPES; type++) > > +#define for_each_migratetype_order_decend(min_order, order, type) \ > + for (order = MAX_ORDER - 1; order < MAX_ORDER && order >= min_order; \ > + order--) \ > + for (type = 0; type < MIGRATE_TYPES; type++) > + Is there going to be any other user outside of mm/page_alloc.c? If not then do not ex...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...;zone->free_area[order]; > >>>>> enum migratetype mt; > >>>>> struct page *page; > >>>>> > >>>>> if (!free_area->nr_pages) > >>>>> continue; > >>>>> > >>>>> for_each_migratetype_order(order, mt) { > >>>>> list_for_each_entry(page, > >>>>> &free_area->free_list[mt], lru) { > >>>>> > >>>>> pfn = page_to_pfn(page); > >>>>> visit(opaque2, prn, 1<<order); > >...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...;zone->free_area[order]; > >>>>> enum migratetype mt; > >>>>> struct page *page; > >>>>> > >>>>> if (!free_area->nr_pages) > >>>>> continue; > >>>>> > >>>>> for_each_migratetype_order(order, mt) { > >>>>> list_for_each_entry(page, > >>>>> &free_area->free_list[mt], lru) { > >>>>> > >>>>> pfn = page_to_pfn(page); > >>>>> visit(opaque2, prn, 1<<order); > >...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...{ > >>> struct free_area *free_area = &zone->free_area[order]; > >>> enum migratetype mt; > >>> struct page *page; > >>> > >>> if (!free_area->nr_pages) > >>> continue; > >>> > >>> for_each_migratetype_order(order, mt) { > >>> list_for_each_entry(page, > >>> &free_area->free_list[mt], lru) { > >>> > >>> pfn = page_to_pfn(page); > >>> visit(opaque2, prn, 1<<order); > >>> } > >>> } >...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...{ > >>> struct free_area *free_area = &zone->free_area[order]; > >>> enum migratetype mt; > >>> struct page *page; > >>> > >>> if (!free_area->nr_pages) > >>> continue; > >>> > >>> for_each_migratetype_order(order, mt) { > >>> list_for_each_entry(page, > >>> &free_area->free_list[mt], lru) { > >>> > >>> pfn = page_to_pfn(page); > >>> visit(opaque2, prn, 1<<order); > >>> } > >>> } >...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...t; > 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_migratetype_order(order, mt) { > > list_for_each_entry(page, > > &free_area->free_list[mt], lru) { > > > > pfn = page_to_pfn(page); > > visit(opaque2, prn, 1<<order); > > } > > } > > } > > > > spin_unlock_irqrestore(&am...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...t; > 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_migratetype_order(order, mt) { > > list_for_each_entry(page, > > &free_area->free_list[mt], lru) { > > > > pfn = page_to_pfn(page); > > visit(opaque2, prn, 1<<order); > > } > > } > > } > > > > spin_unlock_irqrestore(&am...
2017 Jul 13
1
[PATCH v12 7/8] mm: export symbol of next_zone and first_online_pgdat
...00, Wei Wang wrote: > This patch enables for_each_zone()/for_each_populated_zone() to be > invoked by a kernel module. ... for use by virtio balloon. > Signed-off-by: Wei Wang <wei.w.wang at intel.com> balloon seems to only use + for_each_populated_zone(zone) + for_each_migratetype_order(order, type) > --- > mm/mmzone.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/mm/mmzone.c b/mm/mmzone.c > index a51c0a6..08a2a3a 100644 > --- a/mm/mmzone.c > +++ b/mm/mmzone.c > @@ -13,6 +13,7 @@ struct pglist_data *first_online_pgdat(void) > { &gt...
2017 Aug 08
0
[PATCH v13 4/5] mm: support reporting free page blocks
...ne = &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 free_area *free_area = &zone->free_area[order]; > enum migratetype mt; > struct page *page; > > if (!free_area->nr_pages) > continue; > > for_each_migratetype_order(order, mt) { > list_for_each_entry(page, &g...
2017 Aug 10
0
[virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks
...ach_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; order < MAX_ORDER; ++order) { > > > > > >This appears to be covered by for_each_migratetype_order(order, mt) below. yes but #define for_each_migratetype_order(order, type) \ for (order = 0; order < MAX_ORDER; order++) \ for (type = 0; type < MIGRATE_TYPES; type++) so you would have to skip orders < min_order -- Michal Hocko SUSE Labs
2017 Jul 13
1
[PATCH v12 7/8] mm: export symbol of next_zone and first_online_pgdat
...00, Wei Wang wrote: > This patch enables for_each_zone()/for_each_populated_zone() to be > invoked by a kernel module. ... for use by virtio balloon. > Signed-off-by: Wei Wang <wei.w.wang at intel.com> balloon seems to only use + for_each_populated_zone(zone) + for_each_migratetype_order(order, type) > --- > mm/mmzone.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/mm/mmzone.c b/mm/mmzone.c > index a51c0a6..08a2a3a 100644 > --- a/mm/mmzone.c > +++ b/mm/mmzone.c > @@ -13,6 +13,7 @@ struct pglist_data *first_online_pgdat(void) > { &gt...
2016 Jul 27
2
[PATCH v2 repost 6/7] mm: add the related functions to get free page info
On 07/27/2016 03:05 PM, Michael S. Tsirkin wrote: > On Wed, Jul 27, 2016 at 09:40:56AM -0700, Dave Hansen wrote: >> On 07/26/2016 06:23 PM, Liang Li wrote: >>> + for_each_migratetype_order(order, t) { >>> + list_for_each(curr, &zone->free_area[order].free_list[t]) { >>> + pfn = page_to_pfn(list_entry(curr, struct page, lru)); >>> + if (pfn >= start_pfn && pfn <= end_pfn) { >>> + page_num = 1UL << order; >>...
2016 Jul 27
2
[PATCH v2 repost 6/7] mm: add the related functions to get free page info
On 07/27/2016 03:05 PM, Michael S. Tsirkin wrote: > On Wed, Jul 27, 2016 at 09:40:56AM -0700, Dave Hansen wrote: >> On 07/26/2016 06:23 PM, Liang Li wrote: >>> + for_each_migratetype_order(order, t) { >>> + list_for_each(curr, &zone->free_area[order].free_list[t]) { >>> + pfn = page_to_pfn(list_entry(curr, struct page, lru)); >>> + if (pfn >= start_pfn && pfn <= end_pfn) { >>> + page_num = 1UL << order; >>...