tech-kern archive

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

Re: DIOC{G,S}STRATEGY not implemented for all disk devices



On May 14,  9:15am, Gary Thorpe wrote:
} > On Jun 19,  3:10pm, Reinoud Zandijk wrote:
} > } On Wed, Jan 16, 2008 at 10:21:27PM -0800, John Nemeth wrote:
} > } > } There seem to be several almost-identical implementations, in
} > } > } sys/dev/dksubr.c, sys/dev/ld.c, and sys/dev/ata/wd.c; an 
implementation
} > } > } in sys/dev/scsipi/cd.c that always returns EIO; and implementations in
} > } > 
} > } >      I'm not sure it makes sense for cd.c since that is a read-only
} > } > device and isn't truely random access.
} > } 
} > } I have code here for cd.c that actually permits setting the strategy; not 
} > } used anymore though but for dvd+rw/dvd-ram its a truely random access 
} > } device allthough it wouldn't be fast.
} > 
} >      Do these devices work using concentric cylinders similar to the
} > way magnetic media works, or do they use the one long spiral track the
} > way most optical media (and old vinyl records) work?
} 
} Optical disks are...disks. The last time I read up on them, they did

     Just because they are flat and round does not mean that they work
like every other device that is flat and round.

} indeed support random access (all have seek times that are far below

     More like quasi-random access.  Magnetic media organises data in
concentric cylinders with each level of the cylinder being a track that
is divided into sectors.  To seek, you move the heads to the
appropriate cylinder, select the appropriate head, and wait for the
appropriate sector to appear under the head.  Optical media such as CDs
and (most?) DVDs use a single spiral groove similar to old vinyl
records.  To seek, you would have to move the head to position shortly
before where you expect the sector to be, wait until you are properly
aligned with the track, then follow the track to the desired sector.
It is not something that is designed for true random access (remember,
it was originally designed to play music and then was adapted to
data).

} tapes). Disk scheduling would probably make a difference even for

    Yes, it is true that you can seek faster then tape since you can
move the head across the media rather then having to search the length
of the media.

} read-only media as reordering the requests to optimize seek times
} should still apply (mostly for things which do not do such scheduling

     Yes, you would want to schedule reads in ascending order, but is
there any reason to allow any other order?

} internally [most ATAPI, probably most SATA as well]). Not sure what

     ATAPI is basically the SCSI command set using the ATA transport.
It certainly could reorder internally if it can have multiple
outstanding transactions (I don't know if ATAPI allows this).

}-- End of excerpt from Gary Thorpe



Home | Main Index | Thread Index | Old Index