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

Re: [PATCH for-4.19] xen/arch: Centralise __read_mostly and __ro_after_init



On Fri, 13 Jun 2024, Roger Pau Monné wrote:
> On Fri, Jun 14, 2024 at 01:49:50PM +0100, Andrew Cooper wrote:
> > These being in cache.h is inherited from Linux, but is an inappropriate
> > location to live.
> > 
> > __read_mostly is an optimisation related to data placement in order to avoid
> > having shared data in cachelines that are likely to be written to, but it
> > really is just a section of the linked image separating data by usage
> > patterns; it has nothing to do with cache sizes or flushing logic.
> > 
> > Worse, __ro_after_init was only in xen/cache.h because __read_mostly was in
> > arch/cache.h, and has literally nothing whatsoever to do with caches.
> > 
> > Move the definitions into xen/sections.h, which in paritcular means that
> > RISC-V doesn't need to repeat the problematic pattern.  Take the opportunity
> > to provide a short descriptions of what these are used for.
> > 
> > For now, leave TODO comments next to the other identical definitions.  It
> > turns out that unpicking cache.h is more complicated than it appears 
> > because a
> > number of files use it for transitive dependencies.
> 
> I assume that including sections.h from cache.h (in the meantime)
> creates a circular header dependency?

Assuming this patch doesn't introduce ECLAIR regressions:

Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>

 


Rackspace

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