Discussion:
[SCSI] sr: sr_mutex ,multi-drive performance is bad
yang jun
2013-10-28 14:30:58 UTC
Permalink
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=A3=ACit 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" i=
n
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
yang jun
2013-10-29 14:06:01 UTC
Permalink
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
Post by yang jun
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=A3=ACit wil=
l be
Post by yang jun
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" i=
n
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
yang jun
2013-10-29 14:08:35 UTC
Permalink
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
Post by yang jun
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=A3=ACit wil=
l be
Post by yang jun
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" i=
n
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jens Axboe
2013-10-29 14:53:58 UTC
Permalink
Post by yang jun
Dear Mr.Axboe,
=20
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=A3=ACit wil=
l be
Post by yang jun
very slowly.
=20
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 easil=
y.

--=20
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" i=
n
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
yang jun
2013-10-30 15:13:01 UTC
Permalink
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
=2Erelease? Please advise.

Best regards,
Jun Yang
Post by yang jun
Dear Mr.Axboe,
The latest kernel sr_module still uses single mutex,it will serialis=
e
Post by yang jun
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 i=
f
Post by yang jun
there are multiple cdroms being recorded at the same time=A3=ACit wi=
ll be
Post by yang jun
very slowly.
I saw sd_module before,it had removed BKL and made "openers" atomic_=
t
Post by yang jun
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 eas=
ily.
--
Jens Axboe
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" i=
n
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...