On 04/20/2017 11:06 AM, Michal Hocko wrote: > On Thu 20-04-17 10:25:27, Vlastimil Babka wrote: >>> + * intersection with the given zone >>> + */ >>> +static inline bool zone_intersects(struct zone *zone, >>> + unsigned long start_pfn, unsigned long nr_pages) >>> +{ >> >> I'm looking at your current mmotm tree branch, which looks like this: >> >> + * Return true if [start_pfn, start_pfn + nr_pages) range has a non-mpty >> + * intersection with the given zone >> + */ >> +static inline bool zone_intersects(struct zone *zone, >> + unsigned long start_pfn, unsigned long nr_pages) >> +{ >> + if (zone_is_empty(zone)) >> + return false; >> + if (zone->zone_start_pfn <= start_pfn && start_pfn < zone_end_pfn(zone)) >> + return true; >> + if (start_pfn + nr_pages > zone->zone_start_pfn) >> + return true; >> >> A false positive is possible here, when start_pfn >= zone_end_pfn(zone)? > > Ohh, right. Looks better? Yeah. You can add for the whole patch Acked-by: Vlastimil Babka <vbabka@xxxxxxx> But I can't guarantee some corner case won't surface. The hotplug code is far from straightforward :( -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>