Re: [PATCH part4 4/4] x86, acpi, numa, mem_hotplug: Find hotpluggable memory in SRAT memory affinities.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 9, 2013 at 2:32 AM, Tang Chen <tangchen@xxxxxxxxxxxxxx> wrote:
> On 08/09/2013 12:41 AM, Yinghai Lu wrote:
>>
>> On Thu, Aug 8, 2013 at 2:41 AM, Tang Chen<tangchen@xxxxxxxxxxxxxx>  wrote:
>>>
>>> In ACPI SRAT(System Resource Affinity Table), there is a memory affinity
>>> for each
>>> memory range in the system. In each memory affinity, there is a field
>>> indicating
>>> that if the memory range is hotpluggable.
>>>
>>> This patch parses all the memory affinities in SRAT only, and find out
>>> all the
>>> hotpluggable memory ranges in the system.
>>
>>
>> oh, no.
>>
>> How do you make sure the SRAT's entries are right ?
>> later numa_init could reject srat table if srat ranges does not cover
>> e820 memmap.
>
>
> In numa_meminfo_cover_memory(), it checks if SRAT covers the e820 ranges.
> And it uses
>     e820ram = max_pfn - absent_pages_in_range(0, max_pfn)
> to calculate the e820 ram size.
>
> Since max_pfn is initialized before memblock.memory is fulfilled, I think
> we can also do this check at earlier time.
>
>
>>
>> Also parse srat table two times looks silly.
>
>
> By parsing SRAT twice, I can avoid memory allocation for acpi_tables_addr
> in acpi_initrd_override_copy() procedure at such an early time. This memory
> could also be in hotpluggable area.

You already mark kernel position to be not hot-plugged,  so near the
kernel range should be safe to be put override acpi tables.

also what I mean parse srat two times:
parse to get hotplug range, and late parse other numa info again.

Yinghai

--
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>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]