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

Re: [PATCH] xen: Fold exit paths in find_text_region()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 17 Apr 2023 11:00:41 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=AgHRfUQQeZNGr1AjVim4LvKvPYhcoG7vYUgFT7X9IFY=; b=kDlSdJwwK6BCWRf5KCtOBNKr2JppkacJ2LknFWkdxY/oI30EFVY8tnX+fSJXa0vn+Y7/Eqh4IItjzpO00q4RhNkghxVgHYN4NJg3UY4evX9t30HG3UG7WSI1t+8q55LR57x3LpRW8QwDiHylOtceiNDAp3aRj0YRFIItbnCZhONArZS8bFjnSwBmJPZkrQbxDRVzvIAMTtQtlA1p+wWrhOyag/tl0EwEu5YJFEKtePuMr+6Tx7M/69fIn7r/W5N5aJnTcluvcqHX4RNQFZNdx9vEuKEqFKVIkkGccHVJsvtvb4NHsKyVzglmGf+IFypVWAIQSEr7E2gR5JHH0m/3Pw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U5MEbVQYpXp5+8DjxUGREWFi9Gid34VIU2/OVfpI4sUbn+DK3nc4kSjQhnq+4+nkB3V+N+KV3t3liCeV6ve5hdvbqZxmHyzzE1Ldq+qAFTq6+lMDOt8nnTjC0KSTfqOkE+6U24a5oZemNx9xxhIIM7eyrFEeC02F3rpYFOX/7CO5UCteRIuEo7tSrsiEqzsKkqbhyrZJ1jPSeMXJqspMnIJCktE7n0UBH4UAM3s0v61ot+Tv1WQjikM9MwrVf5FsVXrSK/b78S3UtftRmOWrrc/FgdpOHEiF3W1aNE+zXtXn+QANhY7EhQ5Xrsx9yHxh07r4X1MxLrajlmNkfFAfpA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 17 Apr 2023 09:01:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13.04.2023 21:22, Andrew Cooper wrote:
> Despite rcu_read_unlock() being fully inlineable, the optimiser cannot fold
> these exit paths, because of the various compiler barriers providing RCU
> safety.  Help the compiler out.

Mind me asking about "cannot"? Iirc the compiler is permitted to fold
even volatile asm()s, as long as certain guarantees aren't violated.
With "... often won't ..." or alike I'd be happy to give my ack, albeit
doing so with another maintainer's questions pending (and imo wrongly
taken by you as possibly insulting) it's never really clear to me
whether doing so is appropriate. I would specifically argue that ...

> This compiles to marginally better code in all cases.  No functional change.

... even minor improvements are worth it.

> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Preferably (unless proven wrong) with said adjustment and on the basis
that Julien signals his question as addressed (once it really is, of
course):
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



 


Rackspace

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