Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1627310
| From | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 6/9] mm, memory_hotplug: do not associate hotadded memory to zones until online |
| Date | 2017-04-20 13:00 +0200 |
| Message-ID | <tyhYC-7U2-25@gated-at.bofh.it> (permalink) |
| References | <tuFmO-8iD-7@gated-at.bofh.it> <tuFmO-8iD-5@gated-at.bofh.it> <tuKmu-341-21@gated-at.bofh.it> <tyfDs-6zX-11@gated-at.bofh.it> <tygga-73a-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 :(
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v3 6/9] mm, memory_hotplug: do not associate hotadded memory to zones until online Michal Hocko <mhocko@kernel.org> - 2017-04-10 18:30 +0200
Re: [PATCH v3 6/9] mm, memory_hotplug: do not associate hotadded memory to zones until online Vlastimil Babka <vbabka@suse.cz> - 2017-04-20 10:30 +0200
Re: [PATCH v3 6/9] mm, memory_hotplug: do not associate hotadded memory to zones until online Michal Hocko <mhocko@kernel.org> - 2017-04-20 11:10 +0200
Re: [PATCH v3 6/9] mm, memory_hotplug: do not associate hotadded memory to zones until online Vlastimil Babka <vbabka@suse.cz> - 2017-04-20 13:00 +0200
csiph-web