Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1320241 > unrolled thread

Re: [PATCH v3 12/12] acpi, numa: reuse acpi_numa_memory_affinity_init()

Started byHanjun Guo <guohanjun@huawei.com>
First post2016-01-28 03:50 +0100
Last post2016-01-28 14:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 12/12] acpi, numa: reuse  acpi_numa_memory_affinity_init() Hanjun Guo <guohanjun@huawei.com> - 2016-01-28 03:50 +0100
    Re: [PATCH v3 12/12] acpi, numa: reuse  acpi_numa_memory_affinity_init() Robert Richter <robert.richter@caviumnetworks.com> - 2016-01-28 14:40 +0100

#1320241 — Re: [PATCH v3 12/12] acpi, numa: reuse acpi_numa_memory_affinity_init()

FromHanjun Guo <guohanjun@huawei.com>
Date2016-01-28 03:50 +0100
SubjectRe: [PATCH v3 12/12] acpi, numa: reuse acpi_numa_memory_affinity_init()
Message-ID<qVKOK-4TF-15@gated-at.bofh.it>
On 2016/1/27 22:18, Robert Richter wrote:
> On 27.01.16 14:15:06, Hanjun Guo wrote:
>> Hi Robert,
>>
>> On 2016/1/25 18:26, Robert Richter wrote:
>>> On 23.01.16 17:39:27, Hanjun Guo wrote:
>>>> From: Hanjun Guo <hanjun.guo@linaro.org>
>>>>
>>>> After the cleanup for acpi_numa_memory_affinity_init(),
>>>> it can be used for architetures both x86 and arm64, since
>>>> CONFIG_MEMORY_HOTPLUG is not enabled for arm64, so no
>>>> worry about that.
>>>>
>>>> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
>>>> ---
>>>>  arch/arm64/kernel/acpi_numa.c | 42 -------------------------------
>>>>  arch/x86/mm/srat.c            | 54 ----------------------------------------
>>>>  drivers/acpi/numa.c           | 57 +++++++++++++++++++++++++++++++++++++++++++
>>>>  3 files changed, 57 insertions(+), 96 deletions(-)
>>> This one reverts acpi_numa_memory_affinity_init() to the x86 version.
>>> I rather would prefer the arm64 version for the generic code. We could
>>> keep the x86 implementation until x86 maintainers agree to remove them
>>> and use the generic one (implemented in a separate patch).
>>>
>>> Doing so we can move acpi_numa_memory_affinity_init() from the
>>> beginning to generic code (used for arm64) and have this last patch to
>>> remove the x86 version.
>> I think the x86 version is the generic one, all the flags (ACPI_SRAT_MEM_HOT_PLUGGABLE and
>> etc) are defined in the ACPI spec, x86 just use all the flags because it support such features.
>> For ARM64, firmware should be careful and represent the true platform configuration to
>> OS, such as on ARM64, we can't set hotpluggable flag as the ARM64 arch don't support
>> memory hot-plug yet (also the firmware don't support it too), if firmware do things right,
>> it will be not worries for the kernel.
> But you are removing all arm64 from your first patches. Why do you
> introduce acpi_numa_memory_affinity_init() in the beginning to remove
> it in the end again? I esp. like the arm64 version because of its
> direct returns. So I still would like to see generic code for arm64
> from the beginning. Maybe have a copy of x86 initially and make
> modifications for arm64 to it, or move missing code (hotplug, etc.)
> from x86 to generic and remove x86 arch code with the last patch.

OK, so that's the logic and ordering of formatting the patch set, it's easy
to fix :)

I will introduce the generic code for acpi_numa_memory_affinity_init()
in drivers/acpi/numa.c and mark it as __weak from the beginning, and
move missing code from x86 to generic, then remove x86 one as you
suggested, is that OK?

Thanks
Hanjun

[toc] | [next] | [standalone]


#1320676

FromRobert Richter <robert.richter@caviumnetworks.com>
Date2016-01-28 14:40 +0100
Message-ID<qVUXL-43r-3@gated-at.bofh.it>
In reply to#1320241
On 28.01.16 10:48:37, Hanjun Guo wrote:
> On 2016/1/27 22:18, Robert Richter wrote:
> > On 27.01.16 14:15:06, Hanjun Guo wrote:
> >> Hi Robert,
> >>
> >> On 2016/1/25 18:26, Robert Richter wrote:
> >>> On 23.01.16 17:39:27, Hanjun Guo wrote:
> >>>> From: Hanjun Guo <hanjun.guo@linaro.org>
> >>>>
> >>>> After the cleanup for acpi_numa_memory_affinity_init(),
> >>>> it can be used for architetures both x86 and arm64, since
> >>>> CONFIG_MEMORY_HOTPLUG is not enabled for arm64, so no
> >>>> worry about that.
> >>>>
> >>>> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
> >>>> ---
> >>>>  arch/arm64/kernel/acpi_numa.c | 42 -------------------------------
> >>>>  arch/x86/mm/srat.c            | 54 ----------------------------------------
> >>>>  drivers/acpi/numa.c           | 57 +++++++++++++++++++++++++++++++++++++++++++
> >>>>  3 files changed, 57 insertions(+), 96 deletions(-)
> >>> This one reverts acpi_numa_memory_affinity_init() to the x86 version.
> >>> I rather would prefer the arm64 version for the generic code. We could
> >>> keep the x86 implementation until x86 maintainers agree to remove them
> >>> and use the generic one (implemented in a separate patch).
> >>>
> >>> Doing so we can move acpi_numa_memory_affinity_init() from the
> >>> beginning to generic code (used for arm64) and have this last patch to
> >>> remove the x86 version.
> >> I think the x86 version is the generic one, all the flags (ACPI_SRAT_MEM_HOT_PLUGGABLE and
> >> etc) are defined in the ACPI spec, x86 just use all the flags because it support such features.
> >> For ARM64, firmware should be careful and represent the true platform configuration to
> >> OS, such as on ARM64, we can't set hotpluggable flag as the ARM64 arch don't support
> >> memory hot-plug yet (also the firmware don't support it too), if firmware do things right,
> >> it will be not worries for the kernel.
> > But you are removing all arm64 from your first patches. Why do you
> > introduce acpi_numa_memory_affinity_init() in the beginning to remove
> > it in the end again? I esp. like the arm64 version because of its
> > direct returns. So I still would like to see generic code for arm64
> > from the beginning. Maybe have a copy of x86 initially and make
> > modifications for arm64 to it, or move missing code (hotplug, etc.)
> > from x86 to generic and remove x86 arch code with the last patch.
> 
> OK, so that's the logic and ordering of formatting the patch set, it's easy
> to fix :)
> 
> I will introduce the generic code for acpi_numa_memory_affinity_init()
> in drivers/acpi/numa.c and mark it as __weak from the beginning, and
> move missing code from x86 to generic, then remove x86 one as you
> suggested, is that OK?

Sounds good to me. Awaiting your updated version. :)

Btw, I tested the whole series, so:

Tested-by: Robert Richter <rrichter@cavium.com>

-Robert

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web