From: Darrick J. Wong <djwong@xxxxxxxxxx> If an AG has hit the maximum number of inodes that it can queue for inactivation, schedule the worker immediately. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- fs/xfs/xfs_icache.c | 6 ++++++ fs/xfs/xfs_trace.h | 1 + 2 files changed, 7 insertions(+) diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c index 17cc2ac76809..513d380b8b55 100644 --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c @@ -419,6 +419,12 @@ xfs_gc_delay_ms( __return_address); return 0; } + + /* Kick the worker immediately if we've hit the max backlog. */ + if (pag->pag_ici_needs_inactive > XFS_INODEGC_MAX_BACKLOG) { + trace_xfs_inodegc_delay_backlog(pag); + return 0; + } break; default: ASSERT(0); diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h index 43fb699e6aaf..26fc5cf08d5b 100644 --- a/fs/xfs/xfs_trace.h +++ b/fs/xfs/xfs_trace.h @@ -430,6 +430,7 @@ DEFINE_EVENT(xfs_inodegc_backlog_class, name, \ TP_PROTO(struct xfs_perag *pag), \ TP_ARGS(pag)) DEFINE_INODEGC_BACKLOG_EVENT(xfs_inodegc_throttle_backlog); +DEFINE_INODEGC_BACKLOG_EVENT(xfs_inodegc_delay_backlog); DECLARE_EVENT_CLASS(xfs_ag_class, TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno),