lkml.org 
[lkml]   [1999]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: disk head scheduling


On Fri, 26 Mar 1999, Gadi Oxman wrote:
> > ./drivers/block/ide.c: if (bdev->current_request != &bdev->plug)
>
> Every block driver has to have such a line. The current plug
> mehanism is only good if it is checked for and honoured by the
> low level driver, as the only thing which plug_device() does
> is:
>
> dev->current_request = &dev->plug;
>
> Some drivers might check it as follows (like the SCSI driver):
>
> if (CURRENT != NULL && CURRENT->rq_status == RQ_INACTIVE) {
> return;
> }
>
> which is the same thing,

Indeed.

However, I think it would make sense to make the "plug" not actually be a
request itself, but just a flag. Making it a request was a nice way of
minimally impacting the code, but as we will need to have a per-entity
structure to keep track of the per-request-list lock status for
re-entrancy protection, we might as well just make the plug more obvious,
and make it a real flag.

That's just an implementation detail, but it would make it more obvious
what the test is.

Linus


-
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/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.068 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site