Message ID | 1576595472-27341-1-git-send-email-qiwuchen55@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [RESEND] fput: Use unbound workqueue for scheduling delayed fput works | expand |
On Tue, Dec 17, 2019 at 11:11:12PM +0800, qiwuchen55@gmail.com wrote: > From: chenqiwu <chenqiwu@xiaomi.com> > > There is a potential starvation that the number of delayed fput works > increase rapidly if task exit storm or fs unmount issue happens. Err... Details, please, ideally along with a reproducer. In particular, I would like to understand what does any of that have to do with umount. Or to task exits, for that matter - exit_files() is called before exit_task_work(), so you shouldn't normally be seeing task_work_add() failures when files get closed on exit(2)... If you are really observing such problems, it might be worth looking into the underlying situation - something odd appears to be going on and I'd rather understand what it is.
diff --git a/fs/file_table.c b/fs/file_table.c index 30d55c9..472ad92 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -348,7 +348,8 @@ void fput_many(struct file *file, unsigned int refs) } if (llist_add(&file->f_u.fu_llist, &delayed_fput_list)) - schedule_delayed_work(&delayed_fput_work, 1); + queue_delayed_work(system_unbound_wq, + &delayed_fput_work, 1); } }