lkml.org 
[lkml]   [2023]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH/RFC] core/nfsd: allow kernel threads to use task_work.
Date
On Wed, 29 Nov 2023, Oleg Nesterov wrote:
> On 11/28, NeilBrown wrote:
> >
> > I have evidence from a customer site of 256 nfsd threads adding files to
> > delayed_fput_lists nearly twice as fast they are retired by a single
> > work-queue thread running delayed_fput(). As you might imagine this
> > does not end well (20 million files in the queue at the time a snapshot
> > was taken for analysis).
>
> On a related note... Neil, Al, et al, can you look at
>
> [PATCH 1/3] fput: don't abuse task_work_add() when possible
> https://lore.kernel.org/all/20150908171446.GA14589@redhat.com/
>

Would it make sense to create a separate task_struct->delayed_fput
llist?
fput() adds the file to this llist and if it was the first item on the
list, it then adds the task_work. That would probably request adding a
callback_head to struct task_struct as well.

NeilBrown

\
 
 \ /
  Last update: 2023-11-29 01:15    [W:0.138 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site