public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: martin@dalecki.de
Cc: Petr Vandrovec <VANDROVE@vc.cvut.cz>,
	linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: [PATCH] 2.5.30 IDE 113
Date: Tue, 6 Aug 2002 13:17:49 +0200	[thread overview]
Message-ID: <20020806111749.GH1323@suse.de> (raw)
In-Reply-To: <3D4FAE5C.9050205@evision.ag>

On Tue, Aug 06 2002, Marcin Dalecki wrote:
> Uz.ytkownik Jens Axboe napisa?:
> >On Tue, Aug 06 2002, Marcin Dalecki wrote:
> >
> >>Uz.ytkownik Jens Axboe napisa?:
> >>
> >>>On Tue, Aug 06 2002, Marcin Dalecki wrote:
> >>>
> >>>
> >>>>Uz.ytkownik Jens Axboe napisa?:
> >>>>
> >>>>
> >>>>>On Tue, Aug 06 2002, Marcin Dalecki wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>>device not per channel! If q->request_fn would properly return the
> >>>>>>error count instead of void, we could even get rid ot the
> >>>>>>checking for rq->errors after finishment... But well that's
> >>>>>>entierly different story.
> >>>>>
> >>>>>
> >>>>>That's nonsense! What exactly would you return from a request_fn after
> >>>>>having queued, eg, 20 commands? Error count is per request, anything
> >>>>>else would be stupid.
> >>>>
> >>>>Returning the error count in the case q->request_fn is called for
> >>>>a self submitted request like for example REQ_SPECIAL would be handy 
> >>>>and well defined. For the cumulative case it would of course make sense 
> >>>>to return the cumulative error count. Tough not very meaningfull, it 
> >>>>would
> >>>>indicate the occurrence of the error very fine.
> >>>
> >>>
> >>>It's much nicer to maintain a sane API that doesn't depend on stuff like
> >>>the above. Cumulative error count, come on, you can't possibly be
> >>>serious?!
> >>
> >>Hey don't get me wrong - I *do not* suggest adding it becouse I don't 
> >>think we are going to change the "eat as many as possible requests" 
> >>instead of "eat one request" semantics of the q->reuqest_fn().
> >>OK?
> >
> >
> >You look from the IDE perspective, I look from the interface
> >perspective. There's is no "eat one request" semantic of request_fn(),
> >in fact there's just the opposite. If you quit after having just
> >consumed one request, you must make sure to invoke request_fn _yourself_
> >later on -- or use the recent blk_start/stop_queue helpers.
> 
> Yes of course I know that there is not "eat one request" semantic of
> request_fn(). However looking at the interface perspective (out of my
> small corner) I think the above is precisely what leads to ugly things
> (and I think you will agree that this is ugly) like calling 
> do_ide_request() back out from ata_irq_handler() - shrug.

Ho hum, well I think it's only ugly in the way it had to be done
previously. Right now I think the usage is pretty nice, actually

request_fn(q)
{
	rq = elv_next_request();
	start_request(rq);
	blk_stop_queue(q);
}

isr()
{
	handle_completion();
	blk_start_queue(queue);
}

The API works nicely regardless of queue depth and how many requests
request_fn consumes.

-- 
Jens Axboe


  reply	other threads:[~2002-08-06 11:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-06 10:16 [PATCH] 2.5.30 IDE 113 Petr Vandrovec
2002-08-06 10:20 ` Marcin Dalecki
2002-08-06 10:42   ` Jens Axboe
2002-08-06 10:43     ` Marcin Dalecki
2002-08-06 10:54       ` Jens Axboe
2002-08-06 10:52         ` Marcin Dalecki
2002-08-06 11:05           ` Jens Axboe
2002-08-06 11:09             ` Marcin Dalecki
2002-08-06 11:17               ` Jens Axboe [this message]
2002-08-06 11:57                 ` Marcin Dalecki
  -- strict thread matches above, loose matches on Subject: below --
2002-08-06 10:35 Petr Vandrovec
2002-08-06 10:44 ` Jens Axboe
2002-08-06 10:47   ` Marcin Dalecki
2002-08-06 11:03     ` Jens Axboe
2002-08-06 11:04       ` Marcin Dalecki
2002-08-06 11:12         ` Jens Axboe
2002-08-06  9:02 Marcin Dalecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020806111749.GH1323@suse.de \
    --to=axboe@suse.de \
    --cc=VANDROVE@vc.cvut.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin@dalecki.de \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox