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

Re: [PATCH v2 7/8] lib: move bsearch code


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 9 Dec 2020 15:06:28 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=OQe/52FD9Izyodr3+axSsuM6wzeIQcXtUpqM2gZ6Dog=; b=cddb0VBF4GRwi/LPh+bRinUifyhD0FgaZ93KusMdY78rAJA6Z4lxGKHVjLzIRJumGXNLletZblQ4T/x+LGaBBHUURYPCUcXSH4T9L9pIhIzYmS/I6Do4qxOvdvurT6hi5R6p1x5VJ75slw1rf+mYeaolXuc9U0iUCAOVSSIqFVk03IPR5AvdRKw31HOzzo+7fnFDVdEsdfA3QjlSkQY/2EyBMb+jPSZdflq4noaEc2kIJHAziCYlR/Mnbt7rZG0+kbvjnx0tG3dQ5SfHAlo+7kMycKtaGzOHGtwZJSUqMytt+tjq/0IYmdjL8Zfhl8mHaaYyo9b4iviCDfGTnjw1Hg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Eutjk7iEUPMRYhg/ukCpVnKCMRetMJSbIB32Zw7RCdsKubWQ8RPd2DF6+WkJjr0hYbcHimWjMQra8Wt7KBe1Pk5+cOcFX/3OcyRv2B90IAbUs4F5QAMIUhS8qkjPY/cL5sKN1TONLldyrRljDR8o20o7cYY13zLjXEGJRswZF5rdtAkRDSJTQEpAdtrNVrVDgU6nqb/6LXirWc7DNPwVK6tGlWzsSSpdRSrIpbNVqIq2g9DI6kgOQStvBTNf0Rlr/SIQuRT+69chS8b3nNK78GipM8XURbQTLRMavYKz7r+LdpiR06cy1Vuj+Eg7R1cVf/VY3gqawJOYptbdNTrc7A==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Wed, 09 Dec 2020 15:07:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWqSYUW6jKcf9JAUabryyJK6872KnOWaMAgAERSYCABxiQgIAAHyEAgAEQxgCAFABlAIADGMmAgABP5wCAAAergIAAA00A
  • Thread-topic: [PATCH v2 7/8] lib: move bsearch code

Hi Jan,

> On 9 Dec 2020, at 14:54, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 09.12.2020 15:27, Bertrand Marquis wrote:
>>> On 9 Dec 2020, at 09:41, Julien Grall <julien@xxxxxxx> wrote:
>>> On 07/12/2020 10:23, Jan Beulich wrote:
>>>> On 24.11.2020 17:57, Julien Grall wrote:
>>>>> On 24/11/2020 00:40, Andrew Cooper wrote:
>>>>>> On a totally separate point,  I wonder if we'd be better off compiling
>>>>>> with -fgnu89-inline because I can't see any case we're we'd want the C99
>>>>>> inline semantics anywhere in Xen.
>>>>> 
>>>>> This was one of my point above. It feels that if we want to use the
>>>>> behavior in Xen, then it should be everywhere rather than just this 
>>>>> helper.
>>>> I'll be committing the series up to patch 6 in a minute. It remains
>>>> unclear to me whether your responses on this sub-thread are meant
>>>> to be an objection, or just a comment. Andrew gave his R-b despite
>>>> this separate consideration, and I now also have an ack from Wei
>>>> for the entire series. Please clarify.
>>> 
>>> It still feels strange to apply to one function and not the others... But I 
>>> don't have a strong objection against the idea of using C99 inlines in Xen.
>>> 
>>> IOW, I will neither Ack nor NAck this patch.
>> 
>> I think as Julien here: why doing this inline thing for this function and 
>> not the others
>> provided by the library ?
>> Could you explain the reasons for this or the use cases you expect ?
>> 
>> I see 2 usage of bsearch in arm code and I do not get why you are doing this 
>> for
>> bsearch and not for the other functions.
> 
> May I ask whether you read Andrew's quite exhaustive reply to Julien
> asking about this? Apart from this, it was Andrew who had asked to
> inline bsearch(), and I followed that request. The initial version
> of this series didn't have any inlining of these library functions
> (which, after all, also isn't the goal of the series).

I just did (sorry missed that one in the history).

But seeing where this is called and the look of the code with this
change i do not really think that the complexity introduced by this
will make a real win in terms of performance/code size but it does
make this complex.

So I would rather have the inline part out but the code is right:
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

so that this is unblocked.
Regards
Bertrand

> 
> Jan




 


Rackspace

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