An error occurred fetching the project authors.
  1. 09 Aug, 2021 3 commits
  2. 06 Aug, 2021 5 commits
    • Dave Chinner's avatar
      xfs: per-cpu deferred inode inactivation queues · ab23a776
      Dave Chinner authored
      Move inode inactivation to background work contexts so that it no
      longer runs in the context that releases the final reference to an
      inode. This will allow process work that ends up blocking on
      inactivation to continue doing work while the filesytem processes
      the inactivation in the background.
      
      A typical demonstration of this is unlinking an inode with lots of
      extents. The extents are removed during inactivation, so this blocks
      the process that unlinked the inode from the directory structure. By
      moving the inactivation to the background process, the userspace
      applicaiton can keep working (e.g. unlinking the next inode in the
      directory) while the inactivation work on the previous inode is
      done by a different CPU.
      
      The implementation of the queue is relatively simple. We use a
      per-cpu lockless linked list (llist) to queue inodes for
      inactivation without requiring serialisation mechanisms, and a work
      item to allow the queue to be processed by a CPU bound worker
      thread. We also keep a count of the queue depth so that we can
      trigger work after a number of deferred inactivations have been
      queued.
      
      The use of a bound workqueue with a single work depth allows the
      workqueue to run one work item per CPU. We queue the work item on
      the CPU we are currently running on, and so this essentially gives
      us affine per-cpu worker threads for the per-cpu queues. THis
      maintains the effective CPU affinity that occurs within XFS at the
      AG level due to all objects in a directory being local to an AG.
      Hence inactivation work tends to run on the same CPU that last
      accessed all the objects that inactivation accesses and this
      maintains hot CPU caches for unlink workloads.
      
      A depth of 32 inodes was chosen to match the number of inodes in an
      inode cluster buffer. This hopefully allows sequential
      allocation/unlink behaviours to defering inactivation of all the
      inodes in a single cluster buffer at a time, further helping
      maintain hot CPU and buffer cache accesses while running
      inactivations.
      
      A hard per-cpu queue throttle of 256 inode has been set to avoid
      runaway queuing when inodes that take a long to time inactivate are
      being processed. For example, when unlinking inodes with large
      numbers of extents that can take a lot of processing to free.
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      [djwong: tweak comments and tracepoints, convert opflags to state bits]
      Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      ab23a776
    • Darrick J. Wong's avatar
      xfs: move xfs_inactive call to xfs_inode_mark_reclaimable · c6c2066d
      Darrick J. Wong authored
      Move the xfs_inactive call and all the other debugging checks and stats
      updates into xfs_inode_mark_reclaimable because most of that are
      implementation details about the inode cache.  This is preparation for
      deferred inactivation that is coming up.  We also move it around
      xfs_icache.c in preparation for deferred inactivation.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
      c6c2066d
    • Dave Chinner's avatar
      xfs: introduce all-mounts list for cpu hotplug notifications · 0ed17f01
      Dave Chinner authored
      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: default avatarDave Chinner <dchinner@redhat.com>
      [djwong: expand some comments about mount list setup ordering rules]
      Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      0ed17f01
    • Dave Chinner's avatar
      xfs: introduce CPU hotplug infrastructure · f1653c2e
      Dave Chinner authored
      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: default avatarDave Chinner <dchinner@redhat.com>
      [djwong: rearrange some macros, fix function prototypes]
      Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      f1653c2e
    • Christoph Hellwig's avatar
      xfs: remove the active vs running quota differentiation · 149e53af
      Christoph Hellwig authored
      These only made a difference when quotaoff supported disabling quota
      accounting on a mounted file system, so we can switch everyone to use
      a single set of flags and helpers now. Note that the *QUOTA_ON naming
      for the helpers is kept as it was the much more commonly used one.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarCarlos Maiolino <cmaiolino@redhat.com>
      Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      149e53af
  3. 21 Jun, 2021 1 commit
  4. 03 Jun, 2021 1 commit
    • Darrick J. Wong's avatar
      xfs: refactor per-AG inode tagging functions · c076ae7a
      Darrick J. Wong authored
      In preparation for adding another incore inode tree tag, refactor the
      code that sets and clears tags from the per-AG inode tree and the tree
      of per-AG structures, and remove the open-coded versions used by the
      blockgc code.
      
      Note: For reclaim, we now rely on the radix tree tags instead of the
      reclaimable inode count more heavily than we used to.  The conversion
      should be fine, but the logic isn't 100% identical.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
      c076ae7a
  5. 02 Jun, 2021 1 commit
  6. 07 Apr, 2021 1 commit
  7. 25 Mar, 2021 4 commits
  8. 03 Feb, 2021 6 commits
  9. 27 Jan, 2021 1 commit
  10. 24 Jan, 2021 1 commit
  11. 23 Jan, 2021 5 commits
  12. 09 Dec, 2020 5 commits
  13. 25 Sep, 2020 1 commit
  14. 18 Sep, 2020 1 commit
  15. 16 Sep, 2020 4 commits