xfs: introduce CPU hotplug infrastructure
authorDave Chinner <dchinner@redhat.com>
Fri, 6 Aug 2021 18:05:37 +0000 (11:05 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 6 Aug 2021 18:05:37 +0000 (11:05 -0700)
commitf1653c2e2831e9db6cd68473bbec581782df03a5
tree3fa04e4373e85f430c6041e1e0ee883b222d805c
parent149e53afc851713a70b6a06ebfaf2ebf25975454
xfs: introduce CPU hotplug infrastructure

We need to move to per-cpu state for both deferred inode
inactivation and CIL tracking, but to do that we
need to handle CPUs being removed from the system by the hot-plug
code. Introduce generic XFS infrastructure to handle CPU hotplug
events that is set up at module init time and torn down at module
exit time.

Initially, we only need CPU dead notifications, so we only set
up a callback for these notifications. The infrastructure can be
updated in future for other CPU hotplug state machine notifications
easily if ever needed.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
[djwong: rearrange some macros, fix function prototypes]
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_super.c
include/linux/cpuhotplug.h