Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1713205

Re: [PATCH] blktrace: Fix potentail deadlock between delete & sysfs ops

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject Re: [PATCH] blktrace: Fix potentail deadlock between delete & sysfs ops
Date 2017-08-16 20:20 +0200
Message-ID <ufb58-21P-5@gated-at.bofh.it> (permalink)
References <ucZ87-5c-35@gated-at.bofh.it> <ueThT-7HI-9@gated-at.bofh.it> <ufb58-21P-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] blktrace: Fix potentail deadlock between delete & sysfs  ops Steven Rostedt <rostedt@goodmis.org> - 2017-08-16 01:20 +0200
  Re: [PATCH] blktrace: Fix potentail deadlock between delete & sysfs  ops Steven Rostedt <rostedt@goodmis.org> - 2017-08-16 20:20 +0200
    Re: [PATCH] blktrace: Fix potentail deadlock between delete & sysfs  ops Waiman Long <longman@redhat.com> - 2017-08-16 20:50 +0200
      Re: [PATCH] blktrace: Fix potentail deadlock between delete & sysfs  ops Steven Rostedt <rostedt@goodmis.org> - 2017-08-16 21:00 +0200
        Re: [PATCH] blktrace: Fix potentail deadlock between delete & sysfs  ops Waiman Long <longman@redhat.com> - 2017-08-16 21:10 +0200
          Re: [PATCH] blktrace: Fix potentail deadlock between delete & sysfs  ops Steven Rostedt <rostedt@goodmis.org> - 2017-08-16 21:20 +0200
            Re: [PATCH] blktrace: Fix potentail deadlock between delete & sysfs  ops Waiman Long <longman@redhat.com> - 2017-08-16 21:30 +0200
  Re: [PATCH] blktrace: Fix potentail deadlock between delete & sysfs  ops Waiman Long <longman@redhat.com> - 2017-08-16 20:20 +0200

csiph-web