[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] move __read_mostly to xen/cache.h
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 8 Aug 2023 12:35:13 +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=DlJ3WM6FvUIkZY0BuNVxuiXNNnSEQhgfB4Uyx14ToyY=; b=MuM0pIQcNHB+JehZWIKS2nUvv5KjwtLWeSfSeeuCJmwZIbQQ26+uziSKT7ICXt5NpZjCOnKKD8ymQxDc57aO0/9kCuy4Ovue24oE/+OjbtMlgVdZAaEuPhswMbDEAO3TN3EJId00eX+QZ1rTTKTrk3di7Lqfe1eCptSoq4Qx0u0JUpVXAgZnTKW9VP5I7R0x/ZDSZ8ue4f3Ko4Ic0hiYbVsqtrv44204+8IBcjuSlGOVs/v2iU3jjTsXAiJhdpQfN+p8eP1tJOQRKHjbi/z/pzyBaPcxl34Uq/E+FqGMBs0sNvWtmBfaL7WcZCC1JmEx5idGYBLFjomWmqz22qBMoA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g4lwwanTZjhL/RzXv3lqfonBzM1SHMK1c0Tdd5uRbW/sN30h1cNkrIVEa4m2U2L71n4Hj+/WQXhRja/3bFxOZL7Jwej3sJcfZ5LT1wLuZzWuOADCZA4QfuNkNMvIxww0ldQ8D0RG8qcl2aDz1SEnK0oaGZYqNVFWHMVS4ATWJ+wND7+sfjwOmxgTH9wXxVBiL2+o+aCX5dKEBD9vMQzOlDiphJa6B4hIrvi8JJmpsMZYMwMuaxQkY0UgCz794xKg3UtDJzGGsBJ0oyjEDyhTJ3vop6uT9Ej4R3KM8g+NM0cMdxbqTDA+Txv7UiXgra4pjOOD9PT1s1l4tfXfDd4ovA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 08 Aug 2023 10:35:22 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 08.08.2023 12:32, Jan Beulich wrote:
> On 08.08.2023 12:18, Andrew Cooper wrote:
>> On 08/08/2023 10:46 am, Jan Beulich wrote:
>>> There's no need for every arch to define its own identical copy. If down
>>> the road an arch needs to customize it, we can add #ifndef around the
>>> common #define.
>>>
>>> To be on the safe side build-breakage-wise, change a couple of #include
>>> <asm/cache.h> to the xen/ equivalent.
>>>
>>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>>
>> Could we find a better place to put this?
>>
>> __read_mostly is just a section. It's relationship to the cache is only
>> microarchitectural, and is not the same kind of information as the rest
>> of cache.h
>>
>> __ro_after_init is only here because __read_mostly is here, but has
>> absolutely nothing to do with caches whatsoever.
>>
>> If we're cleaning them up, they ought to live elsewhere.
>
> I would be considering init.h (for having most other __section() uses,
> and for also needing __read_mostly), but that's not a great place to
> put these either. In fact I see less connection there than for cache.h.
> So the primary need is a good suggestion (I'm hesitant to suggest to
> introduce section.h just for this). In the absence of this, can we
> perhaps deal with this in a 2nd step, thus not blocking this patch and
> therefore not needing to then also clean up PPC-specific code?
Oh, also: I we move them elsewhere, it wouldn't be logical for xen/cache.h
to include that other header as well. Yet without that the risk of build
breakages (perhaps in only exotic configs) is of course quite a bit higher.
Jan
|