lkml.org 
[lkml]   [2021]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] ceph: reduce contention in ceph_check_delayed_caps()
On Fri, Jun 25, 2021 at 12:54:44PM -0400, Jeff Layton wrote:
<...>
> I'm not sure this approach is viable, unfortunately. Once you've dropped
> the cap_delay_lock, then nothing protects the i_cap_delay_list head
> anymore.
>
> So you could detach these objects and put them on the private list, and
> then once you drop the spinlock another task could find one of them and
> (e.g.) call __cap_delay_requeue on it, potentially corrupting your list.
>
> I think we'll need to come up with a different way to do this...

Ugh, yeah I see what you mean.

Another option I can think off is to time-bound this loop, so that it
would stop after finding the first ci->i_hold_caps_max timestamp that was
set *after* the start of the current run. I'll see if I can come up with
an RFC shortly.

Cheers,
--
Luís

\
 
 \ /
  Last update: 2021-06-28 11:04    [W:0.058 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site