Date: Fri, 13 Feb 2009 11:36:32 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/kern subr_disk.c Message-ID: <200902131136.n1DBacHJ059140@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
luigi 2009-02-13 11:36:32 UTC
FreeBSD src repository
Modified files:
sys/kern subr_disk.c
Log:
SVN rev 188571 on 2009-02-13 11:36:32Z by luigi
Clarify and reimplement the bioq API so that bioq_disksort() has
the correct behaviour (sorting by distance from the current head position
in the scan direction) and bioq_insert_head() and bioq_insert_tail()
have a well defined (and useful) behaviour, especially when intermixed
with calls to bioq_disksort().
In particular:
- fix a bug in the existing bioq_disksort() that did not use the
current head position correctly;
- redefine semantics of bioq_insert_head() and bioq_insert_tail().
bioq_insert_tail() can now be used as a barrier
between previous and subsequent calls to bioq_disksort().
The code is heavily documented in the source code so please refer
to that for the details.
Much of this code comes from Fabio Checconi. Also thanks to Kirk
for feedback on the (re)definition of bioq_insert_tail().
NOTE: in the current tree there is only a handful of files which
intermix calls to bioq_disksort() with bioq_insert_head() and
bioq_insert_tail(). The ordering of the queue in these situation
was not specified (nor easy to figure out) before, so I doubt any
of that code could be affected by the specification of the API.
Also note that the current implementation is significantly simpler
than the previous one (also used in ata_sort_queue()).
It would be useful to reimplement ata_sort_queue() using
the same code used in bioq_disksort().
MFC after: 1 week
Revision Changes Path
1.90 +119 -64 src/sys/kern/subr_disk.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902131136.n1DBacHJ059140>
