fix cpuhotplug04 check last cpu error
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210628/27d84c37/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hygon_cpu_online.png
Type: image/png
Size: 30536 bytes
Desc: not available
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210628/27d84c37/attachment-0001.png>
PATCH 1/1 fix cpuhotplug04 check last cpu error
Quoted 7 lines · On Mon, Jun 28, 2021 at 11:03 AM <[email protected]> wrote:
hi, LiWang,
My cpu is Hygon C86 7185 32-core Processor,
x86_64architecture? kernel is 4.19.90
Only cpu0 has no files?It doesn't seem to have anything to do with the kernel. I tried other kernels, too
Thanks for the info.
I checked my laptop (5.12.11-300.fc34.x86_64), it has no 'online' file in the first cpu0 as well.
It seems common to consider cpu0 is always online, so it won?t have ?cpu0/online?.
(I got this view from google search ^)
But go back to your patch, does it really make sense to correct the judgment of the last CPU?
If I understand correctly, the original judgment is purposely to guarantee all CPUs can be safely offline, so if there is already a cpu0 without an 'online' file, it will be filtered out, right? This means all of the remaining hotplugged CPUs can be offline safely. In this case, the judgment of the last CPU is losing effect as expected. Why should we correct it?
Or, do you get any failures/abnormal in testing?
Quoted 53 lines
Attached is a screenshot.
------------------------------*??????????*
*UnionTech Software Technology Co., Ltd. *
???www.uniontech.com
?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
This email message is intended only for the use of the individual or entity who/which is the intended recipient and may contain information that is privileged or confidential. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution or copying of, or taking any action in reliance on, this e-mail is strictly prohibited. If you have received this email in error, please notify UnionTech Software Technology immediately by replying to this e-mail and immediately delete and discard all copies of the e-mail and the attachment thereto (if any). Thank you.
------------------------------------------------------------------Hi Hao,
Quoted 11 lines · Gou Hao
From: gouhao <[email protected]>
Cpuhotplug04 uses
get_hotplug_cpuswhen traversing,get_hotplug_cpuswill filter out cpu without online files, and $cpus_num will be used to determine the last cpu num?Quoted 3 lines
If some cpu do not have an online file,
it will lead to an error in the judgment of the last cpu.I'm wondering what kind of CPU does not have the online file, and which kernel version is being used? Is that test machine an x86 or MIPS?
--
Regards,
Li Wang
Signature · 5 lines
Regards, Li Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20210628/64c58e22/attachment.htm>