On 21.11.18 г. 21:09 ч., Josef Bacik wrote: > The cleaner thread usually takes care of delayed iputs, with the > exception of the btrfs_end_transaction_throttle path. The cleaner > thread only gets woken up every 30 seconds, so instead wake it up to do > it's work so that we can free up that space as quickly as possible. Have you done any measurements how this affects the overall system. I suspect this introduces a lot of noise since now we are going to be doing a thread wakeup on every iput, does this give a chance to have nice, large batches of iputs that the cost of wake up can be amortized across? > > Reviewed-by: Filipe Manana <fdmanana@xxxxxxxx> > Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx> > --- > fs/btrfs/inode.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c > index 3da9ac463344..3c42d8887183 100644 > --- a/fs/btrfs/inode.c > +++ b/fs/btrfs/inode.c > @@ -3264,6 +3264,7 @@ void btrfs_add_delayed_iput(struct inode *inode) > ASSERT(list_empty(&binode->delayed_iput)); > list_add_tail(&binode->delayed_iput, &fs_info->delayed_iputs); > spin_unlock(&fs_info->delayed_iput_lock); > + wake_up_process(fs_info->cleaner_kthread); > } > > void btrfs_run_delayed_iputs(struct btrfs_fs_info *fs_info) >
