On Fri, Sep 4, 2015 at 10:42 PM, Al Viro wrote:
>
> OK, having found the beginning of the thread, I understand what is being
> attempted, but... why the hell bother with FIFO in the first place? AFAICS,
> task_work_add() uses in VFS (final fput() and final mntput() alike)
> do not care about the
On Fri, Sep 4, 2015 at 10:42 PM, Al Viro wrote:
>
> OK, having found the beginning of the thread, I understand what is being
> attempted, but... why the hell bother with FIFO in the first place? AFAICS,
> task_work_add() uses in VFS (final fput() and final mntput()
On Sat, Sep 05, 2015 at 06:12:34AM +0100, Al Viro wrote:
> First of all, we'd better not count on e.g. delayed fput() *NOT* doing
> task_work_add() - we still need to check if any new work had been added.
> After all, final close() might very well have done a final mntput()
> on a lazy-unmounted
On Sat, Aug 29, 2015 at 02:49:21PM +0200, Oleg Nesterov wrote:
> Let's look keyctl_session_to_parent(). It does task_work_cancel()
> but only because we can not trust user-space. Otherwise we could
> remove it and just do task_work_add(), but this needs fifo.
>
> Fifo just looks more sane to me.
On Mon, Aug 31, 2015 at 01:22:26PM +0800, yalin wang wrote:
> why not provide API like:
> fput()
> fput_nosync() ?
>
> because synchronous version are reasonable and safe in most time,
> let the user to select which version to use is more feasible, no matter if it
> is kthread or not.
On Sat, Aug 29, 2015 at 10:08:30AM -0700, Linus Torvalds wrote:
> Hmm.
>
> I'm wondering if we should just make close_files() (or maybe even
> filp_close()) use a synchronous fput().
>
> Iirc, the reason we delay fput() is that we had some nasty issues for
> the generic fput case. It was called
On Sat, Aug 29, 2015 at 10:08:30AM -0700, Linus Torvalds wrote:
> Hmm.
>
> I'm wondering if we should just make close_files() (or maybe even
> filp_close()) use a synchronous fput().
>
> Iirc, the reason we delay fput() is that we had some nasty issues for
> the generic fput case. It was called
On Mon, Aug 31, 2015 at 01:22:26PM +0800, yalin wang wrote:
> why not provide API like:
> fput()
> fput_nosync() ?
>
> because synchronous version are reasonable and safe in most time,
> let the user to select which version to use is more feasible, no matter if it
> is kthread or not.
On Sat, Sep 05, 2015 at 06:12:34AM +0100, Al Viro wrote:
> First of all, we'd better not count on e.g. delayed fput() *NOT* doing
> task_work_add() - we still need to check if any new work had been added.
> After all, final close() might very well have done a final mntput()
> on a lazy-unmounted
On Sat, Aug 29, 2015 at 02:49:21PM +0200, Oleg Nesterov wrote:
> Let's look keyctl_session_to_parent(). It does task_work_cancel()
> but only because we can not trust user-space. Otherwise we could
> remove it and just do task_work_add(), but this needs fifo.
>
> Fifo just looks more sane to me.
Oleg Nesterov wrote:
> Actually you need a single tail pointer, See 158e1645e07f3e9f7e49.
> But this doesn't matter.
(This uses a circularly linked list, keeping a pointer to the
tail, and tail->next pointing to the head.)
Yes, if you're not trying to be lockless, that works quite well.
> And
On 08/29, George Spelvin wrote:
>
> Oleg Nesterov wrote:
> > On 08/29, Ingo Molnar wrote:
> >> So I'm wondering, is there any strong reason why we couldn't use a double
> >> linked list and still do FIFO and remove that silly linear list walking
> >> hack?
> >
> > This will obviously enlarge
On 08/31, Ingo Molnar wrote:
>
> * Oleg Nesterov wrote:
>
> > On 08/29, Ingo Molnar wrote:
> > >
> > > So I'm wondering, is there any strong reason why we couldn't use a double
> > > linked
> > > list and still do FIFO and remove that silly linear list walking hack?
> >
> > This will obviously
On 08/29, Linus Torvalds wrote:
>
> On Sat, Aug 29, 2015 at 7:11 AM, Eric Dumazet wrote:
> >
> > If this needs to be kept, maybe then add following, to make sure
> > we flush the list at most every BITS_PER_LONG files
>
> Hmm.
>
> I'm wondering if we should just make close_files() (or maybe even
On 08/29, Eric Dumazet wrote:
>
> On Sat, 2015-08-29 at 14:49 +0200, Oleg Nesterov wrote:
> > On 08/28, Eric Dumazet wrote:
> > >
> > > From: Eric Dumazet
> > >
> > > In commit f341861fb0b ("task_work: add a scheduling point in
> > > task_work_run()") I fixed a latency problem adding a
* Oleg Nesterov wrote:
> On 08/29, Ingo Molnar wrote:
> >
> > So I'm wondering, is there any strong reason why we couldn't use a double
> > linked
> > list and still do FIFO and remove that silly linear list walking hack?
>
> This will obviously enlarge callback_head, and it is often
* Oleg Nesterov wrote:
> On 08/29, Ingo Molnar wrote:
> >
> > So I'm wondering, is there any strong reason why we couldn't use a double
> > linked
> > list and still do FIFO and remove that silly linear list walking hack?
>
> This will obviously enlarge callback_head, and it
Oleg Nesterov wrote:
> Actually you need a single tail pointer, See 158e1645e07f3e9f7e49.
> But this doesn't matter.
(This uses a circularly linked list, keeping a pointer to the
tail, and tail->next pointing to the head.)
Yes, if you're not trying to be lockless, that works quite well.
> And
On 08/29, Linus Torvalds wrote:
>
> On Sat, Aug 29, 2015 at 7:11 AM, Eric Dumazet wrote:
> >
> > If this needs to be kept, maybe then add following, to make sure
> > we flush the list at most every BITS_PER_LONG files
>
> Hmm.
>
> I'm wondering if we should just make
On 08/29, George Spelvin wrote:
>
> Oleg Nesterov wrote:
> > On 08/29, Ingo Molnar wrote:
> >> So I'm wondering, is there any strong reason why we couldn't use a double
> >> linked list and still do FIFO and remove that silly linear list walking
> >> hack?
> >
> > This will obviously enlarge
On 08/29, Eric Dumazet wrote:
>
> On Sat, 2015-08-29 at 14:49 +0200, Oleg Nesterov wrote:
> > On 08/28, Eric Dumazet wrote:
> > >
> > > From: Eric Dumazet
> > >
> > > In commit f341861fb0b ("task_work: add a scheduling point in
> > > task_work_run()") I fixed a latency
On 08/31, Ingo Molnar wrote:
>
> * Oleg Nesterov wrote:
>
> > On 08/29, Ingo Molnar wrote:
> > >
> > > So I'm wondering, is there any strong reason why we couldn't use a double
> > > linked
> > > list and still do FIFO and remove that silly linear list walking hack?
> >
> > This
> On Aug 30, 2015, at 01:08, Linus Torvalds
> wrote:
>
> On Sat, Aug 29, 2015 at 7:11 AM, Eric Dumazet wrote:
>>
>> If this needs to be kept, maybe then add following, to make sure
>> we flush the list at most every BITS_PER_LONG files
>
> Hmm.
>
> I'm wondering if we should just make
On Aug 30, 2015, at 01:08, Linus Torvalds torva...@linux-foundation.org
wrote:
On Sat, Aug 29, 2015 at 7:11 AM, Eric Dumazet eric.duma...@gmail.com wrote:
If this needs to be kept, maybe then add following, to make sure
we flush the list at most every BITS_PER_LONG files
Hmm.
I'm
Oleg Nesterov wrote:
> On 08/29, Ingo Molnar wrote:
>> So I'm wondering, is there any strong reason why we couldn't use a double
>> linked list and still do FIFO and remove that silly linear list walking hack?
>
> This will obviously enlarge callback_head, and it is often embedded.
> But this is
On Sat, Aug 29, 2015 at 7:11 AM, Eric Dumazet wrote:
>
> If this needs to be kept, maybe then add following, to make sure
> we flush the list at most every BITS_PER_LONG files
Hmm.
I'm wondering if we should just make close_files() (or maybe even
filp_close()) use a synchronous fput().
Iirc,
On Sat, 2015-08-29 at 06:57 -0700, Eric Dumazet wrote:
> Now we also could question why we needed commit
> 4a9d4b024a3102fc083c925c242d98ac27b1c5f6 ("switch fput to task_work_add
> ") since it seems quite an overhead at task exit with 10^6 of files to
> close.
>
> I understood the
On Sat, 2015-08-29 at 14:49 +0200, Oleg Nesterov wrote:
> On 08/28, Eric Dumazet wrote:
> >
> > From: Eric Dumazet
> >
> > In commit f341861fb0b ("task_work: add a scheduling point in
> > task_work_run()") I fixed a latency problem adding a cond_resched()
> > call.
> >
> > Later, commit
On 08/29, Ingo Molnar wrote:
>
> So I'm wondering, is there any strong reason why we couldn't use a double
> linked
> list and still do FIFO and remove that silly linear list walking hack?
This will obviously enlarge callback_head, and it is often embedded.
But this is minor.
If we use a double
On 08/28, Eric Dumazet wrote:
>
> From: Eric Dumazet
>
> In commit f341861fb0b ("task_work: add a scheduling point in
> task_work_run()") I fixed a latency problem adding a cond_resched()
> call.
>
> Later, commit ac3d0da8f329 added yet another loop to reverse a list,
> bringing back the latency
* Linus Torvalds wrote:
> On Fri, Aug 28, 2015 at 7:42 PM, Eric Dumazet wrote:
> >
> > We could add yet another cond_resched() in the reverse loop, or we can
> > simply
> > remove the reversal, as I do not think anything would depend on order of
> > task_work_add() submitted works.
>
> So
* Linus Torvalds torva...@linux-foundation.org wrote:
On Fri, Aug 28, 2015 at 7:42 PM, Eric Dumazet eric.duma...@gmail.com wrote:
We could add yet another cond_resched() in the reverse loop, or we can
simply
remove the reversal, as I do not think anything would depend on order of
On 08/28, Eric Dumazet wrote:
From: Eric Dumazet eduma...@google.com
In commit f341861fb0b (task_work: add a scheduling point in
task_work_run()) I fixed a latency problem adding a cond_resched()
call.
Later, commit ac3d0da8f329 added yet another loop to reverse a list,
bringing back the
On Sat, 2015-08-29 at 06:57 -0700, Eric Dumazet wrote:
Now we also could question why we needed commit
4a9d4b024a3102fc083c925c242d98ac27b1c5f6 (switch fput to task_work_add
) since it seems quite an overhead at task exit with 10^6 of files to
close.
I understood the 'schedule_work() for
On 08/29, Ingo Molnar wrote:
So I'm wondering, is there any strong reason why we couldn't use a double
linked
list and still do FIFO and remove that silly linear list walking hack?
This will obviously enlarge callback_head, and it is often embedded.
But this is minor.
If we use a double
On Sat, 2015-08-29 at 14:49 +0200, Oleg Nesterov wrote:
On 08/28, Eric Dumazet wrote:
From: Eric Dumazet eduma...@google.com
In commit f341861fb0b (task_work: add a scheduling point in
task_work_run()) I fixed a latency problem adding a cond_resched()
call.
Later, commit
On Sat, Aug 29, 2015 at 7:11 AM, Eric Dumazet eric.duma...@gmail.com wrote:
If this needs to be kept, maybe then add following, to make sure
we flush the list at most every BITS_PER_LONG files
Hmm.
I'm wondering if we should just make close_files() (or maybe even
filp_close()) use a
Oleg Nesterov wrote:
On 08/29, Ingo Molnar wrote:
So I'm wondering, is there any strong reason why we couldn't use a double
linked list and still do FIFO and remove that silly linear list walking hack?
This will obviously enlarge callback_head, and it is often embedded.
But this is minor.
On Fri, Aug 28, 2015 at 7:42 PM, Eric Dumazet wrote:
>
> We could add yet another cond_resched() in the reverse loop, or we
> can simply remove the reversal, as I do not think anything
> would depend on order of task_work_add() submitted works.
So I think this should be ok, with things like file
From: Eric Dumazet
In commit f341861fb0b ("task_work: add a scheduling point in
task_work_run()") I fixed a latency problem adding a cond_resched()
call.
Later, commit ac3d0da8f329 added yet another loop to reverse a list,
bringing back the latency spike :
I've seen in some cases this loop
From: Eric Dumazet eduma...@google.com
In commit f341861fb0b (task_work: add a scheduling point in
task_work_run()) I fixed a latency problem adding a cond_resched()
call.
Later, commit ac3d0da8f329 added yet another loop to reverse a list,
bringing back the latency spike :
I've seen in some
On Fri, Aug 28, 2015 at 7:42 PM, Eric Dumazet eric.duma...@gmail.com wrote:
We could add yet another cond_resched() in the reverse loop, or we
can simply remove the reversal, as I do not think anything
would depend on order of task_work_add() submitted works.
So I think this should be ok,
42 matches
Mail list logo