mbox series

[RFC,0/3] Support CPU hotplug for ARM64

Message ID 1561720392-45907-1-git-send-email-wangxiongfeng2@huawei.com (mailing list archive)
Headers show
Series Support CPU hotplug for ARM64 | expand

Message

Xiongfeng Wang June 28, 2019, 11:13 a.m. UTC
This patchset mark all the GICC node in MADT as possible CPUs even though it
is disabled. But only those enabled GICC node are marked as present CPUs.
So that kernel will initialize some CPU related data structure in advance before
the CPU is actually hot added into the system. This patchset also implement 
'acpi_(un)map_cpu()' and 'arch_(un)register_cpu()' for ARM64. These functions are
needed to enable CPU hotplug.

To support CPU hotplug, we need to add all the possible GICC node in MADT
including those CPUs that are not present but may be hot added later. Those
CPUs are marked as disabled in GICC nodes.

Xiongfeng Wang (3):
  ACPI / scan: evaluate _STA for processors declared via ASL Device
    statement
  arm64: mark all the GICC nodes in MADT as possible cpu
  arm64: Add CPU hotplug support

 arch/arm64/kernel/acpi.c  | 22 ++++++++++++++++++++++
 arch/arm64/kernel/setup.c | 19 ++++++++++++++++++-
 arch/arm64/kernel/smp.c   | 11 +++++------
 drivers/acpi/scan.c       | 12 ++++++++++++
 4 files changed, 57 insertions(+), 7 deletions(-)

Comments

Xiongfeng Wang June 29, 2019, 2:07 a.m. UTC | #1
Sorry, the third patch can't be applied to the lastest kernel. I will send another
version and attach the method to test this patchset.

On 2019/6/28 19:13, Xiongfeng Wang wrote:
> This patchset mark all the GICC node in MADT as possible CPUs even though it
> is disabled. But only those enabled GICC node are marked as present CPUs.
> So that kernel will initialize some CPU related data structure in advance before
> the CPU is actually hot added into the system. This patchset also implement 
> 'acpi_(un)map_cpu()' and 'arch_(un)register_cpu()' for ARM64. These functions are
> needed to enable CPU hotplug.
> 
> To support CPU hotplug, we need to add all the possible GICC node in MADT
> including those CPUs that are not present but may be hot added later. Those
> CPUs are marked as disabled in GICC nodes.
> 
> Xiongfeng Wang (3):
>   ACPI / scan: evaluate _STA for processors declared via ASL Device
>     statement
>   arm64: mark all the GICC nodes in MADT as possible cpu
>   arm64: Add CPU hotplug support
> 
>  arch/arm64/kernel/acpi.c  | 22 ++++++++++++++++++++++
>  arch/arm64/kernel/setup.c | 19 ++++++++++++++++++-
>  arch/arm64/kernel/smp.c   | 11 +++++------
>  drivers/acpi/scan.c       | 12 ++++++++++++
>  4 files changed, 57 insertions(+), 7 deletions(-)
>
Jia He July 4, 2019, 3 a.m. UTC | #2
Hi Xiongfeng

It is a little bit awkful that I am also  investigating acpi based cpu hotplug 
issue silimar with

your idea. My question is your purpose to implement the vcpu hotplug in arm64 qemu?

Thanks for the ellaboration

---
Cheers,
Justin (Jia He)

On 2019/6/28 19:13, Xiongfeng Wang wrote:
> This patchset mark all the GICC node in MADT as possible CPUs even though it
> is disabled. But only those enabled GICC node are marked as present CPUs.
> So that kernel will initialize some CPU related data structure in advance before
> the CPU is actually hot added into the system. This patchset also implement
> 'acpi_(un)map_cpu()' and 'arch_(un)register_cpu()' for ARM64. These functions are
> needed to enable CPU hotplug.
>
> To support CPU hotplug, we need to add all the possible GICC node in MADT
> including those CPUs that are not present but may be hot added later. Those
> CPUs are marked as disabled in GICC nodes.
>
> Xiongfeng Wang (3):
>    ACPI / scan: evaluate _STA for processors declared via ASL Device
>      statement
>    arm64: mark all the GICC nodes in MADT as possible cpu
>    arm64: Add CPU hotplug support
>
>   arch/arm64/kernel/acpi.c  | 22 ++++++++++++++++++++++
>   arch/arm64/kernel/setup.c | 19 ++++++++++++++++++-
>   arch/arm64/kernel/smp.c   | 11 +++++------
>   drivers/acpi/scan.c       | 12 ++++++++++++
>   4 files changed, 57 insertions(+), 7 deletions(-)
>
Xiongfeng Wang July 4, 2019, 3:26 a.m. UTC | #3
Hi Justin,

On 2019/7/4 11:00, Jia He wrote:
> Hi Xiongfeng
> 
> It is a little bit awkful that I am also  investigating acpi based cpu hotplug issue silimar with
> 
> your idea. My question is your purpose to implement the vcpu hotplug in arm64 qemu?

Yes, my purpose is to implement the vcpu hotplug in arm64 qemu. So that I can add or remove vcpu
without shutting down the Guest OS.

Thanks,
Xiongfeng

> 
> Thanks for the ellaboration
> 
> ---
> Cheers,
> Justin (Jia He)
> 
> On 2019/6/28 19:13, Xiongfeng Wang wrote:
>> This patchset mark all the GICC node in MADT as possible CPUs even though it
>> is disabled. But only those enabled GICC node are marked as present CPUs.
>> So that kernel will initialize some CPU related data structure in advance before
>> the CPU is actually hot added into the system. This patchset also implement
>> 'acpi_(un)map_cpu()' and 'arch_(un)register_cpu()' for ARM64. These functions are
>> needed to enable CPU hotplug.
>>
>> To support CPU hotplug, we need to add all the possible GICC node in MADT
>> including those CPUs that are not present but may be hot added later. Those
>> CPUs are marked as disabled in GICC nodes.
>>
>> Xiongfeng Wang (3):
>>    ACPI / scan: evaluate _STA for processors declared via ASL Device
>>      statement
>>    arm64: mark all the GICC nodes in MADT as possible cpu
>>    arm64: Add CPU hotplug support
>>
>>   arch/arm64/kernel/acpi.c  | 22 ++++++++++++++++++++++
>>   arch/arm64/kernel/setup.c | 19 ++++++++++++++++++-
>>   arch/arm64/kernel/smp.c   | 11 +++++------
>>   drivers/acpi/scan.c       | 12 ++++++++++++
>>   4 files changed, 57 insertions(+), 7 deletions(-)
>>
> 
> .
>
Jia He July 4, 2019, 5:55 a.m. UTC | #4
Hi Xiongfeng

On 2019/7/4 11:26, Xiongfeng Wang wrote:
> Hi Justin,
>
> On 2019/7/4 11:00, Jia He wrote:
>> Hi Xiongfeng
>>
>> It is a little bit awkful that I am also  investigating acpi based cpu hotplug issue silimar with
>>
>> your idea. My question is your purpose to implement the vcpu hotplug in arm64 qemu?
> Yes, my purpose is to implement the vcpu hotplug in arm64 qemu. So that I can add or remove vcpu
> without shutting down the Guest OS.

Thanks for the infor, I guess you used GED device in qemu ;-)?

---
Cheers,
Justin (Jia He)
Jia He July 4, 2019, 6:04 a.m. UTC | #5
Hi Xiongfeng

Sorry, I missed your latter mail, you used a emulated SCI interrupt

---
Cheers,
Justin (Jia He)

On 2019/7/4 11:26, Xiongfeng Wang wrote:
> Hi Justin,
>
> On 2019/7/4 11:00, Jia He wrote:
>> Hi Xiongfeng
>>
>> It is a little bit awkful that I am also  investigating acpi based cpu hotplug issue silimar with
>>
>> your idea. My question is your purpose to implement the vcpu hotplug in arm64 qemu?
> Yes, my purpose is to implement the vcpu hotplug in arm64 qemu. So that I can add or remove vcpu
> without shutting down the Guest OS.
>
> Thanks,
> Xiongfeng
>
>> Thanks for the ellaboration
>>
>> ---
>> Cheers,
>> Justin (Jia He)
>>
>> On 2019/6/28 19:13, Xiongfeng Wang wrote:
>>> This patchset mark all the GICC node in MADT as possible CPUs even though it
>>> is disabled. But only those enabled GICC node are marked as present CPUs.
>>> So that kernel will initialize some CPU related data structure in advance before
>>> the CPU is actually hot added into the system. This patchset also implement
>>> 'acpi_(un)map_cpu()' and 'arch_(un)register_cpu()' for ARM64. These functions are
>>> needed to enable CPU hotplug.
>>>
>>> To support CPU hotplug, we need to add all the possible GICC node in MADT
>>> including those CPUs that are not present but may be hot added later. Those
>>> CPUs are marked as disabled in GICC nodes.
>>>
>>> Xiongfeng Wang (3):
>>>     ACPI / scan: evaluate _STA for processors declared via ASL Device
>>>       statement
>>>     arm64: mark all the GICC nodes in MADT as possible cpu
>>>     arm64: Add CPU hotplug support
>>>
>>>    arch/arm64/kernel/acpi.c  | 22 ++++++++++++++++++++++
>>>    arch/arm64/kernel/setup.c | 19 ++++++++++++++++++-
>>>    arch/arm64/kernel/smp.c   | 11 +++++------
>>>    drivers/acpi/scan.c       | 12 ++++++++++++
>>>    4 files changed, 57 insertions(+), 7 deletions(-)
>>>
>> .
>>
Xiongfeng Wang July 4, 2019, 6:17 a.m. UTC | #6
On 2019/7/4 14:04, Jia He wrote:
> Hi Xiongfeng
> 
> Sorry, I missed your latter mail, you used a emulated SCI interrupt

Yes, I only used a emulated SCI interrupt. My colleague is working on the qemu part.
He used the GED device in qemu. But there is still some other issues with the qemu
and he is working on it.

> 
> ---
> Cheers,
> Justin (Jia He)
> 
> On 2019/7/4 11:26, Xiongfeng Wang wrote:
>> Hi Justin,
>>
>> On 2019/7/4 11:00, Jia He wrote:
>>> Hi Xiongfeng
>>>
>>> It is a little bit awkful that I am also  investigating acpi based cpu hotplug issue silimar with
>>>
>>> your idea. My question is your purpose to implement the vcpu hotplug in arm64 qemu?
>> Yes, my purpose is to implement the vcpu hotplug in arm64 qemu. So that I can add or remove vcpu
>> without shutting down the Guest OS.
>>
>> Thanks,
>> Xiongfeng
>>
>>> Thanks for the ellaboration
>>>
>>> ---
>>> Cheers,
>>> Justin (Jia He)
>>>
>>> On 2019/6/28 19:13, Xiongfeng Wang wrote:
>>>> This patchset mark all the GICC node in MADT as possible CPUs even though it
>>>> is disabled. But only those enabled GICC node are marked as present CPUs.
>>>> So that kernel will initialize some CPU related data structure in advance before
>>>> the CPU is actually hot added into the system. This patchset also implement
>>>> 'acpi_(un)map_cpu()' and 'arch_(un)register_cpu()' for ARM64. These functions are
>>>> needed to enable CPU hotplug.
>>>>
>>>> To support CPU hotplug, we need to add all the possible GICC node in MADT
>>>> including those CPUs that are not present but may be hot added later. Those
>>>> CPUs are marked as disabled in GICC nodes.
>>>>
>>>> Xiongfeng Wang (3):
>>>>     ACPI / scan: evaluate _STA for processors declared via ASL Device
>>>>       statement
>>>>     arm64: mark all the GICC nodes in MADT as possible cpu
>>>>     arm64: Add CPU hotplug support
>>>>
>>>>    arch/arm64/kernel/acpi.c  | 22 ++++++++++++++++++++++
>>>>    arch/arm64/kernel/setup.c | 19 ++++++++++++++++++-
>>>>    arch/arm64/kernel/smp.c   | 11 +++++------
>>>>    drivers/acpi/scan.c       | 12 ++++++++++++
>>>>    4 files changed, 57 insertions(+), 7 deletions(-)
>>>>
>>> .
>>>