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

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


  • To: Julien Grall <julien@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 13 Apr 2023 23:09:50 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=kOsCEgAqv4GvFI5JVXuSC44qWWFvhCNpXlX8jZL2Qhk=; b=hHRQSeeZx8oXQFJ1xfmyf38dut/bMagXXBaCi+j4R8qzgilQwuF8hzKuwEYfcExPUaLtJu2McBUe5MUEVh7A++TYsvglaUV+kAvzfGdIsnY1JxRqp3CWCnTGHZUru2rH/UZm9BFD7vzH/UvwT3fuRKqXI2I0VywuTFESKQwvauMogIxGI9uD62DUglo8/QIPrpGjeqeyEIVQStmDAyT0afF3ebr8GUEo/0EhcPaz+cWm1K4CylqSXhJJynA+sIBX2U0QB9akcv5/+D6z5Hrzwe9dZkvU/CYmO+iR5iL7jmKyZB3WqlGW6i3KtJ34ILvz+sLTm/9SG48ateNN9EbOkA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kOQALRFoJSzgxzpef1efsMGDpP5dSD709yaikLV03/aUJaQxoP3lX3lYG4IVuf7HKZHzXa0ChRxGw3E1Bv8tteKmwD4WafeEt8+PxgnGcBgsUnoa5VREd3rBZMr3DheBH7O3HAZ+906blxQCDMalU+TLXAzDmRry3msOVo4JM/Z+SI+t+JWJoxtl7H2trUKOdew6v528kCyhORhkGqBpNmhjH21jjIbBgy/hTa3o3UjG0emTme8RK8u1VKhgyn6ufIcM8txWOJeYtLRrmbHIarKt5ykXdpOKOyr8lzob9sBmyOU5XDPrbhUxmW/81iAMj0PAmtNJVOdCGULlfo9K1w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Thu, 13 Apr 2023 22:10:19 +0000
  • Ironport-data: A9a23:acNQZ6mTEvN2IO1VmQ8VXsvo5gxsJ0RdPkR7XQ2eYbSJt1+Wr1Gzt xIWCmuGOanfNmWjL4t/aom18BhQ7ZLdmtNnHQc9+yFmEiMWpZLJC+rCIxarNUt+DCFhoGFPt JxCN4aafKjYaleG+39B55C49SEUOZmgH+a6U6icfHgqH2eIcQ954Tp7gek1n4V0ttawBgKJq LvartbWfVSowFaYCEpNg064gE4p7aWaVA8w5ARkPqgX5QSGyxH5MbpETU2PByqgKmVrNrbSq 9brlNmR4m7f9hExPdKp+p6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTbZLwXXx/mTSR9+2d/ f0W3XCGpaXFCYWX8AgVe0Ew/yiTpsSq8pefSZS0mZT7I0Er7xIAahihZa07FdRwxwp5PY1B3 f49JytdRxK5vu2n7JudG9RGmeQcCeC+aevzulk4pd3YJdAPZMmbBonvu5pf1jp2gd1SF/HDY cZfcSBocBnLfxxIPBEQFY46m+CrwHL4dlW0qnrM/fZxvzeVkVw3ieCwWDbWUoXiqcF9t0CUv G/ZuU/+BQkXLoe3wjuZ6HO8wOTImEsXXapLTODjqq863gD7Kmo7ExwVbl6cnbqA0HGmANdzB hY70A0vov1nnKCsZpynN/Gim1aGoxodVtx4A+A8rgaXxcL88wufQ2QJUDNFQNgnr9MtAywn0 EeTmNHkDiApt6eaIVq/3LqJqTK5OQAOMHQPIyQDSGMt/N3LsIw1yBXVQb5LC7Wph9f4HTXxx TGiryUkgbgXy8kR2M2T9lfBjy+nurDZQwgt/ALVU2m5qARja+aYi5eA7FHa6bNMKdifR1zY5 HwcwZHGsaYJEI2HkzGLTKMVBra16v2ZMTrax1lyA50m8Dfr8HmmFWxN3AxDyI5SGp5sUVfUj IX74Gu9OLc70KOWUJJK
  • Ironport-hdrordr: A9a23:37+yoK0WQOwtXHE4mGckygqjBLYkLtp133Aq2lEZdPU1SL3gqy nKpp8mPHDP+VUssR0b9+xoW5PwJE80l6QFg7X5VI3KNGOL11dARLsSibcKqAeBJ8SRzI9gPQ oKScVD4FqaNykdsS4vizPIdOod/A==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13/04/2023 9:13 pm, Julien Grall wrote:
>
> On 13/04/2023 20: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.
>
> Please mention which compiler(s) (including version) you used.
>
>>
>> This compiles to marginally better code in all cases.
> So the code itself is fine with me. But this raises a few questions.
> If this is marginal, then why are you doing it? What's your end goal?

I happened to be working in the area while fixing a bug.  But am not
justifying "because I judged it to be worth doing" further; it is
entirely self evident from the fact I sent the patch.

Whether you meant it to be or not, the request comes across as
insulting, and is not something which should be made of any submitter.

But as this kind of thing has come up before, any further debate on the
matter can be made to the code of conduct board.

A better phrasing might have been "I'm sorry, I don't understand.  Why
is this an improvement?"  But I'm only guessing as to what this issue is.


But moving to the technicals aspects, in an attempt to help this along.

Do you understand what folding the exit paths means?  It's a term which
is used frequently enough on list that it ought to be taken for granted,
and is what in my opinion makes the patch entirely self-evident.

> Lastly what do you mean by "all cases"? Is it all arch? All compilers?

Yes.

>
> Anyway, if this pattern is important (TBD why), then I think we should
> update the CODING_STYLE with some guidance. Otherwise, we may
> introduce similar patterns (we already have some).

Perhaps, but I don't have the time, energy, or willing to dive into the
viper pit which is trying to make any changes to that document at all. 
Especially when there's a laundry list of more important topics that
ought to take priority...

~Andrew



 


Rackspace

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