On 11/05/2013 09:43 AM, Douglas Gilbert wrote: > On 13-11-01 11:46 AM, yang jun wrote: >> The sr_mutex is not necessary, so we can delete it. > > It is ironic that you are removing a mutex that serializes > the access to various calls in the sr driver at the same > time we are proposing to add a mutex to the open() > and release() calls in the sg driver. The sg driver's > proposed mutex is finer grained than sr_mutex: one per > device. > > My guess would be that splitting sr_mutex out to > a per device mutex will be safer and get the performance > gain that you seem to be after. Agree - the mutex should be retained, but make it per-device instead. That will fix your original issue as well. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html