lkml.org 
[lkml]   [2017]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 6/9] mm, memory_hotplug: do not associate hotadded memory to zones until online
From
Date
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@suse.cz>

But I can't guarantee some corner case won't surface. The hotplug code
is far from straightforward :(


\
 
 \ /
  Last update: 2017-04-20 12:52    [W:0.441 / U:2.724 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site