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

Re: [Xen-devel] [PATCH] xen/typesafe: Force helpers to be always_inline


  • To: George Dunlap <george.dunlap@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Wed, 23 Oct 2019 10:43:50 +0000
  • Accept-language: en-US
  • 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-SenderADCheck; bh=LkwYLPOvg/lwDPQ8kJhCPSXH/JHFRxYuxjd1LcFi+oA=; b=UeO0/jKf17+ZOpoWb6yMcTHl+VVcRqFEXV+WNjV/mcXk2BkKZ3N745amX9ZKjmfe17Yr/4zlWum9iTcBr4UwuNNX02/rKmO7Kb35fBD0yxW3cJIg8NCSv96/KOPN1Fum0K0KdL815fAAzbMEXeporAGzASWJEFNNe1sDkkOYjOSzzz/af1uzjmV1qtO6OiQDyVvYbicLIqbALvj6DnCGBbTXekYi6ctcaAtTFgj83H6ctkmkc37AjEOqXi0svj8AJriSNzcgxEcKeJcar54Vnqh0ZS1thqjQHy51s9Bj9dSSUBEuX2IV1L5xXW8LARyrzHUgeXhA6sdKPBAusvBCkQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HeUChSyrR7utSUEj4hSs2EMurr9iQJQv5nH0RqU7BfrfXVmTqIySTra9E2ILbRqbAjdKQH48aSjXycBm1vYjVXDYyye8ZPjJogTNizmNFrPuDTYKDW1PLosBFbIX2hr1LxktJW3/HTZiKQUHipCUbav9oYHsaKtjiNVTk+HGkQCZ52owjvBZDp6xRfxNrPuwsTf7sRaC4S6KlzGvg9la4nNTXAqNSnJaBEDkIBz+q15/lLyNqhAfPDGXJ2YX8x7pE+KWR4r5cjsyG4MRuSTLvPnuJ7HCyWjWRcNIQlX98O7U1DuftbiXCeRUdTE9Qqh+9aYLmzSWN9pZKRTJk5uJDA==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Juergen Gross <JGross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, WeiLiu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 23 Oct 2019 10:53:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVd8ORtTnoazZJSEasgW/UXMplwqdFmUiAgACtjZiAAN1GgIADl3G3gARYpwCAFfydgIADB+SAgAACnICAABK3AA==
  • Thread-topic: [PATCH] xen/typesafe: Force helpers to be always_inline

On 23.10.2019 11:37, George Dunlap wrote:
> On 10/23/19 8:27 AM, Jan Beulich wrote:
>> On 21.10.2019 13:10, George Dunlap wrote:
>>> Let's do a cost-benefits analysis of always_inline vs clang_inline.
>>>
>>> For each future gcc version, either it will choose to inline this
>>> function with the `inline` key word or not.
>>>
>>> 1. Use always_inline
>>>  1a. gcc would have done inline anyway.  No cost.
>>>  1b. gcc would not have inlined it.  always_inline takes effect and
>>> there's no cost.
>>> 2. Use clang_inline
>>>  2a. gcc would have done inline anyway.  No cost.
>>>  2b. gcc doesn't inline it.  We have random bugs, a discussion, then a
>>> patch to s/clang_inline/always_inline/g;.
>>>
>>> IOW, I only see a cost here to 2, and no benefit.
>>
>> The benefit of 2 would be the easier way of identifying what was
>> changed just for clang's sake, perhaps with the simple goal of
>> reverting the whole lot without having to fish out all the individual
>> commits that may accumulate over time.
> 
> But they weren't done for clang's sake; they were done for symbol clash
> sake.  If some future version of gcc happened to not inline these, then
> we'd get the same problem.
> 
> So if you want to take this approach, I'd say make the names something
> like, `inline_symbol_clash`.  That tells future people exactly what
> needs to be done to switch them back to "bare" inline; and if we never
> get around to fixing the symbol clash issue, then it will prevent gcc
> from "developing" this issue as well.

Oh, yes, good point.

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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