From: Nathan Lynch <nathanl@linux.ibm.com>
To: Daniel Henrique Barboza <danielhb413@gmail.com>,
linuxppc-dev@lists.ozlabs.org
Cc: tyreld@linux.ibm.com, ldufour@linux.ibm.com, aneesh.kumar@linux.ibm.com
Subject: Re: [PATCH 3/3] powerpc/pseries/cpuhp: delete add/remove_by_count code
Date: Mon, 20 Sep 2021 19:43:44 -0500 [thread overview]
Message-ID: <87k0jaoj0f.fsf@linux.ibm.com> (raw)
In-Reply-To: <19c1f412-ef08-f1ea-8c6b-45921bd1f627@gmail.com>
Daniel Henrique Barboza <danielhb413@gmail.com> writes:
> On 9/20/21 10:55, Nathan Lynch wrote:
>> The core DLPAR code supports two actions (add and remove) and three
>> subtypes of action:
>>
>> * By DRC index: the action is attempted on a single specified resource.
>> This is the usual case for processors.
>> * By indexed count: the action is attempted on a range of resources
>> beginning at the specified index. This is implemented only by the memory
>> DLPAR code.
>> * By count: the lower layer (CPU or memory) is responsible for locating the
>> specified number of resources to which the action can be applied.
>>
>> I cannot find any evidence of the "by count" subtype being used by drmgr or
>> qemu for processors. And when I try to exercise this code, the add case
>> does not work:
>
>
> Just to clarify: did you check both CPU and memory cases and found out that the
> 'by count' subtype isn't used with CPUs, but drmgr has some cases in which
> 'by count' is used with LMBs?
Yes, drmgr uses both the 'by count' and the 'by index' methods for
memory currently on PowerVM.
> I'm asking because I worked with a part of the LMB removal code a few months ago,
> and got stuck in a situation in which the 'by count' and 'by indexed count' are
> similar enough to feel repetitive, but distinct enough to not be easily reduced
> into a single function. If drmgr wasn't using the 'by count' subtypes for LMBs
> that would be a good chance for more code redux.
The 'by count' method is definitely used for memory on PowerVM. I was
under the impression that the 'by indexed count' method was used by qemu
for memory sometimes; I'm pretty sure it's not used on PowerVM.
>> Summary:
>>
>> * This code has not worked reliably since its introduction.
>> * There is no evidence that it is used.
>> * It contains questionable rollback behaviors in error paths which are
>> difficult to test.
>>
>> So let's remove it.
>>
>> Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
>> Fixes: ac71380071d1 ("powerpc/pseries: Add CPU dlpar remove functionality")
>> Fixes: 90edf184b9b7 ("powerpc/pseries: Add CPU dlpar add functionality")
>> Fixes: b015f6bc9547 ("powerpc/pseries: Add cpu DLPAR support for drc-info property")
>> ---
>
> Tested with a QEMU pseries guest, no issues found.
>
>
> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Thanks!
prev parent reply other threads:[~2021-09-21 0:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-20 13:55 [PATCH 0/3] CPU DLPAR/hotplug for v5.16 Nathan Lynch
2021-09-20 13:55 ` [PATCH 1/3] powerpc/pseries/cpuhp: cache node corrections Nathan Lynch
2021-09-20 23:59 ` Daniel Henrique Barboza
2021-09-20 13:55 ` [PATCH 2/3] powerpc/cpuhp: BUG -> WARN conversion in offline path Nathan Lynch
2021-09-20 14:26 ` Christophe Leroy
2021-09-20 14:39 ` Nathan Lynch
2021-09-21 0:05 ` Daniel Henrique Barboza
2021-09-20 13:55 ` [PATCH 3/3] powerpc/pseries/cpuhp: delete add/remove_by_count code Nathan Lynch
2021-09-20 21:50 ` kernel test robot
2021-09-21 0:18 ` Daniel Henrique Barboza
2021-09-21 0:43 ` Nathan Lynch [this message]
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=87k0jaoj0f.fsf@linux.ibm.com \
--to=nathanl@linux.ibm.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=danielhb413@gmail.com \
--cc=ldufour@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=tyreld@linux.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).