lkml.org 
[lkml]   [2017]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] blktrace: Fix potentail deadlock between delete & sysfs ops
On Wed, 16 Aug 2017 14:14:36 -0400
Waiman Long <longman@redhat.com> wrote:

> > You also just turned the mutex into a spinlock. What happens if we just
> > preempted the owner of bdev->bd_mutex and are an RT task with higher
> > priority? This will turn into a live lock.
> >
> >> + schedule();
> >> + }
> >>
>
> That is OK because I used schedule() instead of cpu_relax() for
> inserting delay.

Please explain to me how that is OK? schedule is a nop if the current
task is the highest priority task running, and it preempted the owner
of the lock. Nothing will actually schedule.

-- Steve

\
 
 \ /
  Last update: 2017-08-16 20:18    [W:0.109 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site