I just realized that IOCTL_CDROM_READ_TOC is used almost everywhere in mcicda and somewhere else, but on the other hand it is as fast as a snail. A 68-track CD took 10 minutes to scan in cdplayer and if you press play, another 10 minutes will pass before it even starts playing! It appears to be a good idea to cache the TOC somewhere, but where and how?
Best, Waldeck
Waldeck Schutzer wrote:
I just realized that IOCTL_CDROM_READ_TOC is used almost everywhere in mcicda and somewhere else, but on the other hand it is as fast as a snail. A 68-track CD took 10 minutes to scan in cdplayer and if you press play, another 10 minutes will pass before it even starts playing! It appears to be a good idea to cache the TOC somewhere, but where and how?
how come you get those timings ? even if we read 10 times more the TOC as we need (so 700 times), it means the toc reading on the CD takes 600s, so basically a second for a toc reading, which could occur when the CD rom is first inserted, otherwise it's crazy questions: do you have some other apps accessing the cdrom (another playback app, automount...) ?
A+
Hi Eric,
It is very strange indeed, but I just tested it again and I'm convinced that on my system that call can take a few seconds. I'm also pretty sure there is no concurrent access to the drive and automount is not running. I even did this on a failsafe session just to be sure, but still the same thing. I wonder there is something wrong with my kernel (2.4.18), or worse, with my computer. On the other hand, it works pretty fast on Windows.
Waldeck
Eric Pouech wrote:
Waldeck Schutzer wrote:
I just realized that IOCTL_CDROM_READ_TOC is used almost everywhere in mcicda and somewhere else, but on the other hand it is as fast as a snail. A 68-track CD took 10 minutes to scan in cdplayer and if you press play, another 10 minutes will pass before it even starts playing! It appears to be a good idea to cache the TOC somewhere, but where and how?
how come you get those timings ? even if we read 10 times more the TOC as we need (so 700 times), it means the toc reading on the CD takes 600s, so basically a second for a toc reading, which could occur when the CD rom is first inserted, otherwise it's crazy questions: do you have some other apps accessing the cdrom (another playback app, automount...) ?
A+
Waldeck Schutzer wrote:
Hi Eric,
It is very strange indeed, but I just tested it again and I'm convinced that on my system that call can take a few seconds. I'm also pretty sure there is no concurrent access to the drive and automount is not running. I even did this on a failsafe session just to be sure, but still the same thing.
maybe you could try it with a simple C program: 1/ open fd 2/ do the read toc ioctl 3/ close time the operation 2/
I wonder there is something wrong with my kernel (2.4.18), or worse, with my computer. On the other hand, it works pretty fast on Windows.
rather strange... I reran on my computer win98 cdplayer, and everything's ok. I wonder if the CD ROM driver in Linux is not to blame then
A+
Here is something interesting. When I turn the drive back into a plain ide (by removing the ide-scsi option from the kernel options), it speeds up considerably. Now it rocks! This makes me wonder what the heck is going on with the kernel.
Waldeck
Eric Pouech wrote:
Waldeck Schutzer wrote:
Hi Eric,
It is very strange indeed, but I just tested it again and I'm convinced that on my system that call can take a few seconds. I'm also pretty sure there is no concurrent access to the drive and automount is not running. I even did this on a failsafe session just to be sure, but still the same thing.
maybe you could try it with a simple C program: 1/ open fd 2/ do the read toc ioctl 3/ close time the operation 2/
I wonder there is something wrong with my kernel (2.4.18),
or worse, with my computer. On the other hand, it works pretty fast on Windows.
rather strange... I reran on my computer win98 cdplayer, and everything's ok. I wonder if the CD ROM driver in Linux is not to blame then
A+
Waldeck Schutzer wrote:
Here is something interesting. When I turn the drive back into a plain ide (by removing the ide-scsi option from the kernel options), it speeds up considerably. Now it rocks! This makes me wonder what the heck is going on with the kernel.
dunno maybe either some non caching being used in scsi, or request queueing with timers... should find some time reading the kernel source though
A+