From: Hari Bathini <hbathini@linux.ibm.com>
To: Pingfan Liu <piliu@redhat.com>
Cc: Baoquan He <bhe@redhat.com>,
kexec@lists.infradead.org,
Mahesh Salgaonkar <mahesh@linux.ibm.com>,
Sourabh Jain <sourabhjain@linux.ibm.com>,
Ming Lei <ming.lei@redhat.com>,
Nicholas Piggin <npiggin@gmail.com>,
linuxppc-dev@lists.ozlabs.org, Wen Xiong <wenxiong@us.ibm.com>
Subject: Re: [PATCHv9 2/2] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt
Date: Fri, 20 Oct 2023 13:20:44 +0530 [thread overview]
Message-ID: <71e968e2-4d9e-bf65-d00c-bb9feac7e4ed@linux.ibm.com> (raw)
In-Reply-To: <CAF+s44S33-x=bjZsLc=Ke+J6UFPq6DMxPA1Vaohc6_qLoEw9iw@mail.gmail.com>
On 18/10/23 1:51 pm, Pingfan Liu wrote:
> On Tue, Oct 17, 2023 at 6:39 PM Hari Bathini <hbathini@linux.ibm.com> wrote:
>>
>>
>>
>> On 17/10/23 7:58 am, Pingfan Liu wrote:
>>> *** Idea ***
>>> For kexec -p, the boot cpu can be not the cpu0, this causes the problem
>>> of allocating memory for paca_ptrs[]. However, in theory, there is no
>>> requirement to assign cpu's logical id as its present sequence in the
>>> device tree. But there is something like cpu_first_thread_sibling(),
>>> which makes assumption on the mapping inside a core. Hence partially
>>> loosening the mapping, i.e. unbind the mapping of core while keep the
>>> mapping inside a core.
>>>
>>> *** Implement ***
>>> At this early stage, there are plenty of memory to utilize. Hence, this
>>> patch allocates interim memory to link the cpu info on a list, then
>>> reorder cpus by changing the list head. As a result, there is a rotate
>>> shift between the sequence number in dt and the cpu logical number.
>>>
>>> *** Result ***
>>> After this patch, a boot-cpu's logical id will always be mapped into the
>>> range [0,threads_per_core).
>>>
>>> Besides this, at this phase, all threads in the boot core are forced to
>>> be onlined. This restriction will be lifted in a later patch with
>>> extra effort.
>>>
>>> Signed-off-by: Pingfan Liu <piliu@redhat.com>
>>> Cc: Michael Ellerman <mpe@ellerman.id.au>
>>> Cc: Nicholas Piggin <npiggin@gmail.com>
>>> Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
>>> Cc: Mahesh Salgaonkar <mahesh@linux.ibm.com>
>>> Cc: Wen Xiong <wenxiong@us.ibm.com>
>>> Cc: Baoquan He <bhe@redhat.com>
>>> Cc: Ming Lei <ming.lei@redhat.com>
>>> Cc: Sourabh Jain <sourabhjain@linux.ibm.com>
>>> Cc: Hari Bathini <hbathini@linux.ibm.com>
>>> Cc: kexec@lists.infradead.org
>>> To: linuxppc-dev@lists.ozlabs.org
>>
>> Thanks for working on this, Pingfan.
>> Looks good to me.
>>
>> Acked-by: Hari Bathini <hbathini@linux.ibm.com>
>>
>
> Thank you for kindly reviewing. I hope that after all these years, we
> have accomplished the objective.
>
I hope so too.
Thanks!
next prev parent reply other threads:[~2023-10-20 7:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 2:28 [PATCHv9 0/2] enable nr_cpus for powerpc Pingfan Liu
2023-10-17 2:28 ` [PATCHv9 1/2] powerpc/setup : Enable boot_cpu_hwid for PPC32 Pingfan Liu
2023-10-17 10:31 ` Hari Bathini
2023-10-17 2:28 ` [PATCHv9 2/2] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt Pingfan Liu
2023-10-17 10:33 ` Hari Bathini
2023-10-18 8:21 ` Pingfan Liu
2023-10-20 7:50 ` Hari Bathini [this message]
2023-11-27 4:30 ` Hari Bathini
2023-11-29 1:30 ` Pingfan Liu
2024-01-09 4:27 ` Hari Bathini
2024-01-09 4:33 ` Hari Bathini
2023-10-21 16:39 ` Sourabh Jain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=71e968e2-4d9e-bf65-d00c-bb9feac7e4ed@linux.ibm.com \
--to=hbathini@linux.ibm.com \
--cc=bhe@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.ibm.com \
--cc=ming.lei@redhat.com \
--cc=npiggin@gmail.com \
--cc=piliu@redhat.com \
--cc=sourabhjain@linux.ibm.com \
--cc=wenxiong@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).