lkml.org 
[lkml]   [2020]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V4 1/3] mm/sparsemem: Enable vmem_altmap support in vmemmap_populate_basepages()
From
Date
> Hmm, I assume these are some decisions that x86 platform will have to
> make going forward in a subsequent patch as the third patch does for
> the arm64 platform. But it is clearly beyond the scope of this patch
> which never intended to change existing behavior on a given platform.
>

Yeah, I would be curious if my assumption is correct.

>>
>> [...]
>>
>>>
>>> -pte_t * __meminit vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node)
>>> +pte_t * __meminit vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node,
>>> + struct vmem_altmap *altmap)
>>> {
>>> pte_t *pte = pte_offset_kernel(pmd, addr);
>>> if (pte_none(*pte)) {
>>> pte_t entry;
>>> - void *p = vmemmap_alloc_block_buf(PAGE_SIZE, node);
>>> + void *p;
>>> +
>>> + if (altmap)
>>> + p = altmap_alloc_block_buf(PAGE_SIZE, altmap);
>>> + else
>>> + p = vmemmap_alloc_block_buf(PAGE_SIZE, node);
>>> if (!p)
>>> return NULL;
>>
>> I was wondering if
>>
>> if (altmap)
>> p = altmap_alloc_block_buf(PAGE_SIZE, altmap);
>> if (!p)
>> p = vmemmap_alloc_block_buf(PAGE_SIZE, node);
>> if (!p)
>> return NULL
>>
>> Would make sense. But I guess this isn't really relevant in practice,
>> because the altmap is usually sized properly.
>>
>> In general, LGTM.
>
> Okay, I assume that no further changes are required here.
>

Jep,

Reviewed-by: David Hildenbrand <david@redhat.com>

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2020-07-07 09:29    [W:0.093 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site