On Thu, Feb 25, 2021 at 10:26:00AM +1100, Dave Chinner wrote: > From: Dave Chinner <dchinner@xxxxxxxxxx> > > The AIL pushing is stalling on log forces when it comes across > pinned items. This is happening on removal workloads where the AIL > is dominated by stale items that are removed from AIL when the > checkpoint that marks the items stale is committed to the journal. > This results is relatively few items in the AIL, but those that are > are often pinned as directories items are being removed from are > still being logged. ..... > One of the complexities here is that the CIL push does not guarantee > that the commit record for the CIL checkpoint is written to disk. > The current log force ensures this by submitting the current ACTIVE > iclog that the commit record was written to. We need the CIL to > actually write this commit record to disk for an async push to > ensure that the checkpoint actually makes it to disk and unpins the > pinned items in the checkpoint on completion. Hence we need to pass > down to the CIL push that we are doing an async flush so that it can > switch out the commit_iclog if necessary to get written to disk when > the commit iclog is finally released. > > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> > --- > Version 2: > - ensure the CIL checkpoint issues the commit record to disk for an > async push. Fixes generic/530 hang on small logs. > - increment log force stats when the CIL is forced and also when it > sleeps to give insight into the amount of blocking being done when > the CIL is forced. Oops, looks like I forgot to strip debug trace_printk()s out of the patch before sending it. They are gone now, so I'll wait for review comments before resending again... Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx