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

Re: [Xen-devel] [PATCH 4/4] xen/percpu: Make DECLARE_PER_CPU() and __DEFINE_PER_CPU() common


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Tue, 30 Jul 2019 08:11:41 +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=T9KRxJLvPGWOyGzPfBaWltewQRRl1hATwyrSZp5J/oY=; b=RZsCh4eYJxs0E91HzYNvrAmfF0g7JdO5iXcENa3wtXFZcyLiLaHjt1hhtRpdlz+1excwhcbfZdU8gsMu3AsAy84nYFtgzI9jhMYL7Su58pACXtQ1yhpDS0a+hUf38TnAKXEoVsdjr3VSqAIett0zd7umvr4EN/tiNVSA+qANRwVpgk9okx4B8K2SoW2F/geVGVEeTg5O2BjTkDRLuAnQU+doMA3shg6uRa7gTaytn4awOK4j90qjxLa4TPX204jAlybTPC28ZnweeoqpIkdgXPnyPlbFJYhIUg9k4/TgQL+IsQ7JfaPtLjbNEOac9+oaB7ARboec/ICfRXpezQDoFg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PbaXp8w+M6yATjFGHvYyy3i9aw4Hg9N4snmiTD/xiyZvateCiEUl1knJzAC8APPKOuO7ndgajJCSggqVji2npUVPFpcQ59/aV1WgjOdtUkX+f9VIRWU+uLI+AR8bBeIaiCbkrOh6WpmTh7+EUTnHPmATzuz2szROJeOVHC9CkOpokhBbM0tq3ajSHYK5oONqnBNRJGeETaWUiSuvtlog4h9wWW/HX8+5Z1mTdiht0STOPENT4GV1XoCnbI/kGngPHlq1ZCcOCUJzQoYllGsxcwICtiyRCOIugqOlsnNOk1X+ox7LZbHnW4EO/nn7LrUy1g86J+8URI5pncAN48hgug==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Juergen Gross <JGross@xxxxxxxx>, StefanoStabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 30 Jul 2019 08:16:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVQ/aLJfmONJuXtEOXa2NkIvPAfabhkz+AgAAGfoKAAAiSgIAARZsggADs94A=
  • Thread-topic: [PATCH 4/4] xen/percpu: Make DECLARE_PER_CPU() and __DEFINE_PER_CPU() common

On 29.07.2019 20:03, Andrew Cooper wrote:
> On 29/07/2019 14:54, Jan Beulich wrote:
>> On 29.07.2019 15:23, Andrew Cooper wrote:
>>> On 29/07/2019 14:00, Jan Beulich wrote:
>>>> On 26.07.2019 23:08, Andrew Cooper wrote:
>>>>> --- a/xen/include/xen/percpu.h
>>>>> +++ b/xen/include/xen/percpu.h
>>>>> @@ -3,6 +3,12 @@
>>>>>     
>>>>>     #include <asm/percpu.h>
>>>>>     
>>>>> +#define DECLARE_PER_CPU(type, name) \
>>>>> +    extern __typeof__(type) per_cpu__ ## name
>>>>> +
>>>>> +#define __DEFINE_PER_CPU(attr, type, name) \
>>>>> +    attr __typeof__(type) per_cpu_ ## name
>>>>> +
>>>>>     /*
>>>>>      * Separate out the type, so (int[3], foo) works.
>>>>>      *
>>>> By moving things here you render stale the remainder of the
>>>> comment in context above: No per-arch symbol name prefix is going
>>>> to be possible anymore. I'm not against it, but this comment
>>>> would then want adjusting. What's not immediately clear to me is
>>>> whether the two-stage concatenation of an underscore each is then
>>>> still necessary.
>>> Yes it is still necessary.  See the TSS thread for why.
>> No, that thread doesn't explain it. From an initial look I think
>> two-stage expansion is still necessary
> 
> It is about preventing 'name' being expanded, due to the mess with
> cpumask_scratch, which requires a ## at least at the top level.
> 
> I personally think that fixing cpumask_scratch is the right way to go,
> but I specifically didn't touch that so as to avoid wreaking havoc with
> Juergen's core-scheduling series.
> 
>> , but it could then be
>> _ ## name on the first and per_cpu ## name on the second (i.e.
>> no double underscore in the middle anymore).
> 
> Hmm, probably, but...
> 
>> Of course there may
>> be reasons why we actually _want_ a double underscore there.
> 
> ... I don't have the effort or energy - but most importantly, time - to
> rewrite Xen from scratch.
> 
> If there is a concrete reason why dropping the double underscore is
> good/necessary/other, then it should be present as its own patch, not
> crowbarred into an unrelated cleanup patch.
> 
> Until then, the inertia of "because its already like this" wins.

And this is all fine, as long as the comment in question continues
to reflect reality after this change.

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®.