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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 16 Aug 2017 14:14:36 -0400
Waiman Long <longman@xxxxxxxxxx> 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



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux