Date: Tue, 5 Jul 2005 10:33:53 -0700 From: Luigi Rizzo <rizzo@icir.org> To: Poul-Henning Kamp <phk@haven.freebsd.dk> Cc: s223560@studenti.ing.unipi.it, current@freebsd.org Subject: Re: struct buf_queue_head still existing in 5.x/6.x ? Message-ID: <20050705103353.A8185@xorpc.icir.org> In-Reply-To: <35386.1120575587@phk.freebsd.dk>; from phk@haven.freebsd.dk on Tue, Jul 05, 2005 at 04:59:47PM %2B0200 References: <20050705053114.A96381@xorpc.icir.org> <35386.1120575587@phk.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 05, 2005 at 04:59:47PM +0200, Poul-Henning Kamp wrote: > In message <20050705053114.A96381@xorpc.icir.org>, Luigi Rizzo writes: > > >Can someone explain why in both 5.x and 6.x, we still have > >"struct buf_queue_head" defined in sys/buf.h ? > > Because things take time :-) ok thanks. Then i have a few hopefully easy questions. (background - this is related to the work my SoC student Emiliano, in Cc, is doing on the disk scheduler) The disk scheduler operates on struct bio_queue_head objects (which include CSCAN scheduler info) and uses 5 methods: bioq_init() initializes the queue. bioq_disksort() to add requests to the queue bioq_first() to peek at the head of the queue bioq_remove() to remove the first element. bioq_flush() right now simply a wrapper around bioq_first() and bioq_remove(), but one could imagine the need for a specific destructor to free memory etc. bioq_insert_head() and bioq_insert_tail() do operate on the same objects; however my impression is that they are used just because they need a TAILQ of struct bio, and bio_queue_head happened to be there - in a perfect world they would be methods of a different class, right ? cheers luigi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050705103353.A8185>