lkml.org 
[lkml]   [2022]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] x86: Change the return type of acpi_map_cpu2node to void
From
On 6/10/22 03:44, Li kunyu wrote:
> Reduce eax register calls by removing unused return values.

Please stop sending these patches, at least with these repetitive,
inaccurate descriptions.

This patch has *ZERO* to do with EAX. For one, it's patching two
architectures that might not even have an EAX. (I'm blissfully unaware
of what the ia64 calling conventions are and I want to keep it that way.)

Second, (and this is important), look carefully at the function in question:

static int acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)

See the "static"? That tells the compiler that acpi_map_cpu2node() is
only used locally. It lets the compiler do all kinds of fancy things,
like inline the function which allows the compiler to do all kinds of
fun optimizations. Now, armed with that knowledge, please take a look
at what effect your patch has in practice.

Take your patch, and disassemble acpi_map_cpu() before and after
applying it. First of all, even before your patch, do you see a:

call ffffffff81d0000d <acpi_map_cpu2node>

?

Do you see a call to numa_set_node()? That's odd considering that
acpi_map_cpu() doesn't directly call numa_set_node(). Right? Do you
see unnecessary manipulation of EAX? Now, apply your patch.
Disassemble the function again. What changed?

Now, armed with the knowledge of what your patch actually does to the
code, would you like to try and write a better changelog? Or, better
yet, maybe it will dissuade you from sending this again.

\
 
 \ /
  Last update: 2022-06-10 14:37    [W:0.052 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site