public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [SCSI] sr: sr_mutex ,multi-drive performance is bad
@ 2013-10-28 14:30 yang jun
  2013-10-29 14:06 ` yang jun
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: yang jun @ 2013-10-28 14:30 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-scsi@vger.kernel.org

Dear Mr.Axboe,

The latest kernel sr_module still uses single mutex,it will serialise
all sr ioctls. Otto Meta had mentioned this on Jan 1st, 2013 . Some
record tools such as growisofs use SG_IO to write data to disc, so if
there are multiple cdroms being recorded at the same time,it will be
very slowly.

I saw sd_module before,it had removed BKL and made "openers" atomic_t
in scsi_disk. Shall we do the same thing to sr_module? That is, to
remove sr_mutex and make "use_count" atomic_t in cdrom_device_info.

Yours Sincerely,
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [SCSI] sr: sr_mutex ,multi-drive performance is bad
  2013-10-28 14:30 [SCSI] sr: sr_mutex ,multi-drive performance is bad yang jun
@ 2013-10-29 14:06 ` yang jun
  2013-10-29 14:08 ` yang jun
  2013-10-29 14:53 ` Jens Axboe
  2 siblings, 0 replies; 5+ messages in thread
From: yang jun @ 2013-10-29 14:06 UTC (permalink / raw)
  To: otto.patches; +Cc: linux-scsi@vger.kernel.org, Jens Axboe

Dear Mr.Meta

I saw your patch about sr_module, I very curious why the latest kernel
still keep sr_mutex. Can sr_mutex be deleted just like sd_module?

Yours Sincerely

2013/10/28 yang jun <yangjun.donglife123@gmail.com>:
> Dear Mr.Axboe,
>
> The latest kernel sr_module still uses single mutex,it will serialise
> all sr ioctls. Otto Meta had mentioned this on Jan 1st, 2013 . Some
> record tools such as growisofs use SG_IO to write data to disc, so if
> there are multiple cdroms being recorded at the same time,it will be
> very slowly.
>
> I saw sd_module before,it had removed BKL and made "openers" atomic_t
> in scsi_disk. Shall we do the same thing to sr_module? That is, to
> remove sr_mutex and make "use_count" atomic_t in cdrom_device_info.
>
> Yours Sincerely,
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [SCSI] sr: sr_mutex ,multi-drive performance is bad
  2013-10-28 14:30 [SCSI] sr: sr_mutex ,multi-drive performance is bad yang jun
  2013-10-29 14:06 ` yang jun
@ 2013-10-29 14:08 ` yang jun
  2013-10-29 14:53 ` Jens Axboe
  2 siblings, 0 replies; 5+ messages in thread
From: yang jun @ 2013-10-29 14:08 UTC (permalink / raw)
  To: otto.patches; +Cc: linux-scsi@vger.kernel.org, Jens Axboe

Dear Mr.Meta

I saw your patch about sr_module, I very curious why the latest kernel
still keep sr_mutex. Can sr_mutex be deleted just like sd_module?

Yours Sincerely

2013/10/28 yang jun <yangjun.donglife123@gmail.com>:
> Dear Mr.Axboe,
>
> The latest kernel sr_module still uses single mutex,it will serialise
> all sr ioctls. Otto Meta had mentioned this on Jan 1st, 2013 . Some
> record tools such as growisofs use SG_IO to write data to disc, so if
> there are multiple cdroms being recorded at the same time,it will be
> very slowly.
>
> I saw sd_module before,it had removed BKL and made "openers" atomic_t
> in scsi_disk. Shall we do the same thing to sr_module? That is, to
> remove sr_mutex and make "use_count" atomic_t in cdrom_device_info.
>
> Yours Sincerely,
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [SCSI] sr: sr_mutex ,multi-drive performance is bad
  2013-10-28 14:30 [SCSI] sr: sr_mutex ,multi-drive performance is bad yang jun
  2013-10-29 14:06 ` yang jun
  2013-10-29 14:08 ` yang jun
@ 2013-10-29 14:53 ` Jens Axboe
  2013-10-30 15:13   ` yang jun
  2 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2013-10-29 14:53 UTC (permalink / raw)
  To: yang jun; +Cc: linux-scsi@vger.kernel.org

On 10/28/2013 08:30 AM, yang jun wrote:
> Dear Mr.Axboe,
> 
> The latest kernel sr_module still uses single mutex,it will serialise
> all sr ioctls. Otto Meta had mentioned this on Jan 1st, 2013 . Some
> record tools such as growisofs use SG_IO to write data to disc, so if
> there are multiple cdroms being recorded at the same time,it will be
> very slowly.
> 
> I saw sd_module before,it had removed BKL and made "openers" atomic_t
> in scsi_disk. Shall we do the same thing to sr_module? That is, to
> remove sr_mutex and make "use_count" atomic_t in cdrom_device_info.

The same conversion that happened to sd could apply to sr just as easily.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [SCSI] sr: sr_mutex ,multi-drive performance is bad
  2013-10-29 14:53 ` Jens Axboe
@ 2013-10-30 15:13   ` yang jun
  0 siblings, 0 replies; 5+ messages in thread
From: yang jun @ 2013-10-30 15:13 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-scsi@vger.kernel.org, otto.patches

Hi, Jens,

Thanks for your response. When various processes compete for sr_mutex
in .open or .release, the performance will not be worse much, the
main degradation of performance is caused  by sr_block_ioctl which
can't release sr_mutex until one io comletes. So, shall we remove
sr_mutex only from sr_block_ioctl but still keep sr_mutex in .open and
.release?  Please advise.

Best regards,
Jun Yang

2013/10/29 Jens Axboe <axboe@kernel.dk>:
> On 10/28/2013 08:30 AM, yang jun wrote:
>> Dear Mr.Axboe,
>>
>> The latest kernel sr_module still uses single mutex,it will serialise
>> all sr ioctls. Otto Meta had mentioned this on Jan 1st, 2013 . Some
>> record tools such as growisofs use SG_IO to write data to disc, so if
>> there are multiple cdroms being recorded at the same time,it will be
>> very slowly.
>>
>> I saw sd_module before,it had removed BKL and made "openers" atomic_t
>> in scsi_disk. Shall we do the same thing to sr_module? That is, to
>> remove sr_mutex and make "use_count" atomic_t in cdrom_device_info.
>
> The same conversion that happened to sd could apply to sr just as easily.
>
> --
> Jens Axboe
>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-10-30 15:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-28 14:30 [SCSI] sr: sr_mutex ,multi-drive performance is bad yang jun
2013-10-29 14:06 ` yang jun
2013-10-29 14:08 ` yang jun
2013-10-29 14:53 ` Jens Axboe
2013-10-30 15:13   ` yang jun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox