Re: [PATCH, pre-03/20 #2] xfs: introduce all-mounts list for cpu hotplug notifications

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

 



On Wed, Aug 04, 2021 at 09:06:01AM -0700, Darrick J. Wong wrote:
> On Wed, Aug 04, 2021 at 09:50:51PM +1000, Dave Chinner wrote:
> > 
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > 
> > The inode inactivation and CIL tracking percpu structures are
> > per-xfs_mount structures. That means when we get a CPU dead
> > notification, we need to then iterate all the per-cpu structure
> > instances to process them. Rather than keeping linked lists of
> > per-cpu structures in each subsystem, add a list of all xfs_mounts
> > that the generic xfs_cpu_dead() function will iterate and call into
> > each subsystem appropriately.
> > 
> > This allows us to handle both per-mount and global XFS percpu state
> > from xfs_cpu_dead(), and avoids the need to link subsystem
> > structures that can be easily found from the xfs_mount into their
> > own global lists.
> > 
> > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
....
> > @@ -2090,6 +2126,11 @@ xfs_cpu_hotplug_destroy(void)
> >  	cpuhp_remove_state_nocalls(CPUHP_XFS_DEAD);
> >  }
> >  
> > +#else /* !CONFIG_HOTPLUG_CPU */
> > +static inline int xfs_cpu_hotplug_init(struct xfs_cil *cil) { return 0; }
> > +static inline void xfs_cpu_hotplug_destroy(struct xfs_cil *cil) {}
> 
> void arguments here, right?

Ah, yeah, most likely.

> > +#endif
> 
> Nit: I think this ifdef stuff belongs in the previous patch.  Will fix
> it when I drag this into my tree.

I didn't have them in the previous patch because when
CONFIG_HOTPLUG_CPU=n the cpuhotplug functions are stubbed out and
the compiler elides it all as they collapse down to functions that are
just "return 0". It's not until the mount list appears that there is
something we need to elide from the source ourselves...

<shrug>

Doesn't worry me either way.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux