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

Re: [PATCH v6 5/7] x86: control memset() and memcpy() inlining


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Tue, 24 Jun 2025 17:00:01 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=s3uEL0VfP8gxDc1pnTVaS5liZ4SfDSVgPX7sBd+vu68=; b=Z2S6w5ULcMSqxnT3aohSSpM3rDzXSFmOCa4itMYty3/IDL42MpbxB3Axdoaxt44x4LTxployuss2GiyVkDb6Zug2x2s1z9lYh1qJFDooyxwj0YicRf7BC86v+03GfdyUyshzMFpRKmUgrXUvu5FtC1Vc7jiXKKz5a4yf5bv0Ub2lTEzsVUQ6avvTqvlnly0xqprGzMm9RrH0pa87bc9OVkerBFaO/2+XQIW0caWGzkc9f685YK0/j1m6hrZmnSKU8ByIr7w2ZQFCKDacXuywT+Zc4KnrsRoZETYJ4m+2CDWv8o54qNxzB7ABhBTtgly5EkCGL88gWXmtrMVa756QOQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MaDYHQtcdwDInOO8yTpbxE8fJJhGgELhOdZZnMWlaePjdxndXH6wp70s67WrJRWTc5fMHaH/dnWaipXPc46pk1YULm5QiasE+CDC3pA6i4zjZvCpRfkVh5DSM3+0/8Fuwhu8vjGidZjIPCiKsqXqtIA/qmnePFXsplJrHNRxzW/pTvzqrIqhBOcYB+pTd2ecMckGck/aN2Ni59EMBuHGX3EYDliTtai1zcu1j6U2jF9r3m+1sTIb+LUknenqeEALcCTOitaQba8lryqfFTHJ4xC19JFbtK/uX65/gZ5AEkuIkw9enMefoFNZDGhZGiAHrrb1KkFbwt2dZOc4ch0BOw==
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 24 Jun 2025 21:00:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-06-16 09:01, Jan Beulich wrote:
Stop the compiler from inlining non-trivial memset() and memcpy() (for
memset() see e.g. map_vcpu_info() or kimage_load_segments() for
examples). This way we even keep the compiler from using REP STOSQ /
REP MOVSQ when we'd prefer REP STOSB / REP MOVSB (when ERMS is
available).

With gcc10 this yields a modest .text size reduction (release build) of
around 2k.

Unfortunately these options aren't understood by the clang versions I
have readily available for testing with; I'm unaware of equivalents.

Note also that using cc-option-add is not an option here, or at least I
couldn't make things work with it (in case the option was not supported
by the compiler): The embedded comma in the option looks to be getting
in the way.

Requested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.