Messages in this thread | | | Date | Thu, 25 Mar 1999 21:10:17 +0100 (MET) | From | Gerard Roudier <> | Subject | Re: disk head scheduling |
| |
On Wed, 24 Mar 1999, Eric Youngdale wrote:
> On Wed, 24 Mar 1999, Stephen C. Tweedie wrote: > > > Hi, > > > > On Tue, 23 Mar 1999 21:41:56 +0100 (MET), Gerard Roudier > > <groudier@club-internet.fr> said: > > > > > A) Linux is doing IOs per block or per page from the kernel and we need > > > to coalesce and sort this small virtual IOs somewhere. > > > > > B) The Linux design is, at the moment, to perform this work from > > > ll_rw_blk. > > > > > The get_queue() only function looks like some band-aid for IDE to me. > > > Since too partial design is bad design I am not going to use this method. > > > > You really have to justify that statement! > > Indeed. It seems fairly clean to me - I was actually thinking
It is currently as fairly clean as the following, but this will probably become worse later, IMO, if it not _really_ cleaned as it deserves:
./drivers/block/ide.c: if (bdev->current_request != &bdev->plug) ./drivers/block/ide.c: if (bdev->current_request != &bdev->plug) /* FIXME: this will do for now */ ./drivers/block/ide.c: if (bdev->current_request == &bdev->plug) /* FIXME: paranoia */ ./drivers/block/ide.c: printk("%s: Huh? nuking plugged queue\n", drive->name); ./drivers/block/raid5.c:static void unplug_devices(struct stripe_head *sh) ./drivers/block/raid5.c: unplug_device(blk_dev + MAJOR(raid_conf->disks[i].dev)); ./drivers/block/raid5.c: int i, handled = 0, unplug = 0; ./drivers/block/raid5.c: unplug = 1; ./drivers/block/raid5.c: unplug = 1; ./drivers/block/raid5.c: if (unplug) { ./drivers/block/raid5.c: PRINTK(("unplugging devices, sector == %lu, count == %d\n", sh->sector, raid_conf->sector_count)); ./drivers/block/raid5.c: unplug_devices(sh); ./drivers/block/raid5.c: unplug = 0;
Note that in the raid code, this fairly clean thing is just #ifed ZERO.
> that the idea could be significantly enhanced such that get_queue instead > returns a pointer to a structure: > > struct request_queue > { > struct request * current_request; > request_fn_proc * request_fn; > make_request_fn * merge_fn; > spinlock_t io_request_lock; > void * queuedata; > }; > > such that each queue has it's own queue head (obviously - this is > effectively all this structure contained before), function pointers for > requeust queueing, mergeing of new commands, a lock (to be used in place > of io_request_lock), and finally an abstract pointer that request_fn() > could use (for whatever purpose the actual queue handler wanted). > > -Eric
Gérard.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |