cvs commit: src/sys/dev/ata atapi-cd.c

Peter Edwards peadar.edwards at gmail.com
Mon Oct 10 03:56:37 PDT 2005


> +> Please see geom_disk.c
>
> So bascially, you allocate next bio before sending current one?
> That's one way of doing it, but I prefer to treat bio allocation as atomic
> operation, ie. if I cannot allocate all bios, I send no bio down and call
> g_io_deliver(parent_bio, ENOMEM) right away.
> Do you see any protential problems with doing so?

I think an advantage to Poul-Henning's approach is that it reduces
latency: the I/O can start immediately, rather than requiring all the
bio's to be allocated first. The very fact that the race condition was
triggered indicates that the IO devices can overtake the CPU. You
might waste some time in the failure case, but that's obviously a
small price to pay for improved performance in the normal run of
things.

This mightn't be important for CD disks, but for something like RAID
arrays it might be a different story.


More information about the cvs-src mailing list