lkml.org 
[lkml]   [2004]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: floppy driver 2.6.3 question
Date
"Also sprach Jens Axboe:"
> On Thu, Mar 18 2004, Peter T. Breuer wrote:
> > Hmm .. I though SPECIAL was "just" to ensure ordering of requests and
> > I went to some lengths to ensure that if I receive a request then we
> > start diverting incoming requests to an alternate queue until we have
> > treated all the requests already on the device queue! Then we ack the
> > special and pass the requests back from the alternate queue. You are
> > telling me that I needn't have bothered since I'm the only one who
> > could generate a special? Owww.
>
> No, ->special is for the driver receiving the request,

I mean that I thought that if ->flags & REQ_SPECIAL were set, then
we were obliged to flush the driver request queue before treating
this request, and I also thought that the driver was liable to receive
such things from somewhere else.

What I now suppose from your words above is that

a) ->flags & REQ_SPECIAL is something I can set all on my own.
b) if I do (or even if I don't?), the ->special field is mine to use?
(I am surprised since I dimly recall spotting it used for
something).

:).

> I don't know what
> kind of bastard driver you are trying to create :-). If you pass it on,
> you cannot use it.
>
> But your code just using the after-last bit is still severly broken, you
> must not play tricks like that.

It gets even worse, since I was using the very highest bits of ->flag
for a sequence counter. Very successfully, I may add. Is there any
other place I can simply add to the request a counter for the number of
(write) requests having gone through the driver? The idea is that the
driver is the only one who knows the real time order in which requests
are received, so it must be the one to stamp them, and if somebody else
wants to receive these and preserve order, this sequence number must be
observed. But I didn't see anywhere to put them.

Are you going to say, set REQ_SPECIAL on everything and add all the
real request info and a bit more to ->special? I suspect you are!

> Actually, sounds like you are attempting to create an io stack at the
> wrong level. Why aren't you just hooking into ->make_request_fn()

I don't quite understand. Using a different make_request_fn for these
"special" requests is useful and indeed I do use one. But an "io
stack"?

> instead? You are in for all sorts of pains doing what you describe
> above.

Well, everything was working fine apart from death after revalidation!
But I am attempting a rewrite now in accordance with what you say,
which is why I am happy for elaboration/confirmation of (a-b) above.

I presume I can't get "special" requests off of anywhere but the READ
and WRITE free lists via blk_get_request? It would be easier to debug
if there were a separate list.


Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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