[lkml]   [2023]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v4] pipe: use __pipe_{lock,unlock} instead of spinlock
On Sat, Jan 28, 2023 at 10:05 PM Hongchen Zhang
<> wrote:
> Use spinlock in pipe_{read,write} cost too much time,IMO
> pipe->{head,tail} can be protected by __pipe_{lock,unlock}.
> On the other hand, we can use __pipe_{lock,unlock} to protect
> the pipe->{head,tail} in pipe_resize_ring and
> post_one_notification.

No, we really can't.

post_one_notification() is called under the RCU lock held, *and* with
a spinlock held.

It simply cannot do a sleeping lock like __pipe_lock().

So that patch is simply fundamentally buggy, I'm afraid.


 \ /
  Last update: 2023-03-27 00:01    [W:0.272 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site