Re: [PATCH 1/2] util: Separate numactl and stubs into different source files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 20, 2023 at 11:50:16AM +0000, Daniel P. Berrangé wrote:
On Mon, Mar 20, 2023 at 12:39:55PM +0100, Martin Kletzander wrote:
Fix the build, mainly with clang's optimizations and demonstrate a
separation of function implementations.  This patch does it only for
functions that differ in implementation based on WITH_NUMACTL but
ideally this would be done for the WITH_NUMAD and __linux__ parts as
well.

I don't think we should do this, as it is addressing just one specific
example that happens to hit us today. We've hit thue same problem a few
years ago in different functions.


I think it is a quite clean solution that still makes sense even in case
GCC starts doing similar "optimization" (quotes because looking at the
assembly in this specific instance there is no speed-up or size change,
it can actually be a bit bigger in size).  And we could eventually end
up with visible separation of mocked functions, but that is not the main
intention of this proposal.

The problem with interprocedural analysis is a general one that can affect
any part of the code base. I don't think we want wait to hit the problem
again in yet another piece of the code in the future, as it is really
horrible to debug and diagnose.


Of course we can still keep the second patch, even though we will not
find out the outliers.

The use of the -fsemantic-interposition arg gives us a general solution
to the problem with CLang for the long term, that makes our mocking of
functions reliable.


For this particular problem, yes.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux