search for: for_each_migratetype_order_decend

Displaying 18 results from an estimated 18 matches for "for_each_migratetype_order_decend".

2017 Aug 08
2
[virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks
...} >> } >> >> spin_unlock_irqrestore(&zone->lock, flags); >> } >> >> [...] >> > > What do you think if we further simply the above implementation like > this: > > for_each_populated_zone(zone) { > for_each_migratetype_order_decend(1, order, mt) { here it will be min_order (passed by the caller), instead of "1", that is, for_each_migratetype_order_decend(min_order, order, mt) > spin_lock_irqsave(&zone->lock, flags); > list_for_each_entry(page, > &zone->free_area[orde...
2017 Aug 08
2
[virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks
...} >> } >> >> spin_unlock_irqrestore(&zone->lock, flags); >> } >> >> [...] >> > > What do you think if we further simply the above implementation like > this: > > for_each_populated_zone(zone) { > for_each_migratetype_order_decend(1, order, mt) { here it will be min_order (passed by the caller), instead of "1", that is, for_each_migratetype_order_decend(min_order, order, mt) > spin_lock_irqsave(&zone->lock, flags); > list_for_each_entry(page, > &zone->free_area[orde...
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 export this...
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 export this...
2017 Aug 10
1
[virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks
...r, 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 #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++) If you don't like the macro, we can also directly use it in the code. I think it would be better to report the lar...
2017 Aug 10
1
[virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks
...r, 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 #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++) If you don't like the macro, we can also directly use it in the code. I think it would be better to report the lar...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...itself could get invalid in the meantime. Please always keep robustness > >in mind first. Optimizations are nice but it is even not clear whether > >the simple variant will cause any problems. > > > how about this: > > for_each_populated_zone(zone) { > for_each_migratetype_order_decend(min_order, order, type) { > do { > => spin_lock_irqsave(&zone->lock, flags); > ret = report_free_page_block(zone, order, type, > &page)) { > pfn...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...itself could get invalid in the meantime. Please always keep robustness > >in mind first. Optimizations are nice but it is even not clear whether > >the simple variant will cause any problems. > > > how about this: > > for_each_populated_zone(zone) { > for_each_migratetype_order_decend(min_order, order, type) { > do { > => spin_lock_irqsave(&zone->lock, flags); > ret = report_free_page_block(zone, order, type, > &page)) { > pfn...
2017 Aug 03
0
[PATCH v13 4/5] mm: support reporting free page blocks
...mmzone.h b/include/linux/mmzone.h index 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++) + extern int page_group_by_mobility_disabled; #define NR_MIGRATETYPE_BITS (PB_migrate_end - PB_migrate + 1) diff...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
On Thu 03-08-17 19:27:19, Wei Wang wrote: > On 08/03/2017 06:44 PM, Michal Hocko wrote: > >On Thu 03-08-17 18:42:15, Wei Wang wrote: > >>On 08/03/2017 05:11 PM, Michal Hocko wrote: > >>>On Thu 03-08-17 14:38:18, Wei Wang wrote: > >[...] > >>>>+static int report_free_page_block(struct zone *zone, unsigned int order, > >>>>+
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
On Thu 03-08-17 19:27:19, Wei Wang wrote: > On 08/03/2017 06:44 PM, Michal Hocko wrote: > >On Thu 03-08-17 18:42:15, Wei Wang wrote: > >>On 08/03/2017 05:11 PM, Michal Hocko wrote: > >>>On Thu 03-08-17 14:38:18, Wei Wang wrote: > >[...] > >>>>+static int report_free_page_block(struct zone *zone, unsigned int order, > >>>>+
2017 Aug 08
0
[PATCH v13 4/5] mm: support reporting free page blocks
...ge); > visit(opaque2, prn, 1<<order); > } > } > } > > spin_unlock_irqrestore(&zone->lock, flags); > } > > [...] > What do you think if we further simply the above implementation like this: for_each_populated_zone(zone) { for_each_migratetype_order_decend(1, order, mt) { spin_lock_irqsave(&zone->lock, flags); list_for_each_entry(page, &zone->free_area[order].free_list[mt], lru) { pfn = page_to_pfn(page); visit(opaque1, pf...
2017 Aug 03
0
[PATCH v13 4/5] mm: support reporting free page blocks
...nsider that struct page pointer > itself could get invalid in the meantime. Please always keep robustness > in mind first. Optimizations are nice but it is even not clear whether > the simple variant will cause any problems. how about this: for_each_populated_zone(zone) { for_each_migratetype_order_decend(min_order, order, type) { do { => spin_lock_irqsave(&zone->lock, flags); ret = report_free_page_block(zone, order, type, &page)) { pfn = page_to_pfn(page)...
2017 Aug 03
0
[PATCH v13 4/5] mm: support reporting free page blocks
...lid in the meantime. Please always keep robustness >>> in mind first. Optimizations are nice but it is even not clear whether >>> the simple variant will cause any problems. >> >> how about this: >> >> for_each_populated_zone(zone) { >> for_each_migratetype_order_decend(min_order, order, type) { >> do { >> => spin_lock_irqsave(&zone->lock, flags); >> ret = report_free_page_block(zone, order, type, >> &page)) { >>...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...ways keep robustness > >>>in mind first. Optimizations are nice but it is even not clear whether > >>>the simple variant will cause any problems. > >> > >>how about this: > >> > >>for_each_populated_zone(zone) { > >> for_each_migratetype_order_decend(min_order, order, type) { > >> do { > >> => spin_lock_irqsave(&zone->lock, flags); > >> ret = report_free_page_block(zone, order, type, > >> &page)) { &gt...
2017 Aug 03
2
[PATCH v13 4/5] mm: support reporting free page blocks
...ways keep robustness > >>>in mind first. Optimizations are nice but it is even not clear whether > >>>the simple variant will cause any problems. > >> > >>how about this: > >> > >>for_each_populated_zone(zone) { > >> for_each_migratetype_order_decend(min_order, order, type) { > >> do { > >> => spin_lock_irqsave(&zone->lock, flags); > >> ret = report_free_page_block(zone, order, type, > >> &page)) { &gt...
2017 Aug 03
12
[PATCH v13 0/5] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following new features: 1) fast ballooning: transfer ballooned pages between the guest and host in chunks using sgs, instead of one by one; and 2) free_page_vq: a new virtqueue to report guest free pages to the host. The second feature can be used to accelerate live migration of VMs. Here are some details: Live migration needs to
2017 Aug 03
12
[PATCH v13 0/5] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following new features: 1) fast ballooning: transfer ballooned pages between the guest and host in chunks using sgs, instead of one by one; and 2) free_page_vq: a new virtqueue to report guest free pages to the host. The second feature can be used to accelerate live migration of VMs. Here are some details: Live migration needs to