All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Makisara <Kai.Makisara@kolumbus.fi>
To: Michael Christie <michaelc@cs.wisc.edu>
Cc: device-mapper development <dm-devel@redhat.com>,
	James Bottomley <James.Bottomley@SteelEye.com>,
	Christoph Hellwig <hch@infradead.org>, Jens Axboe <axboe@suse.de>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [dm-devel] Re: [PATCH RFC 0/4] use scatter lists for all block pc requests and simplify hw handlers
Date: Tue, 7 Jun 2005 19:26:15 +0300 (EEST)	[thread overview]
Message-ID: <Pine.LNX.4.61.0506071914360.3034@kai.makisara.local> (raw)
In-Reply-To: <1118159134.42a5c11eb8965@webmail.cs.wisc.edu>

On Tue, 7 Jun 2005, Michael Christie wrote:

> Quoting Michael Christie <michaelc@cs.wisc.edu>:
> 
> > Quoting James Bottomley <James.Bottomley@SteelEye.com>:
> > 
> > > On Tue, 2005-06-07 at 13:10 +0100, Christoph Hellwig wrote:
> > > > shouldn't blk_rq_map_kern handle a 0 buffer and do nothing more than
> > > > blk_get_request?  It's not exactly a criticial fastpath and that would
> > make
> > > life
> > > > easier for the callers.
> > > 
> > > Yes ... and it should probably do bio bouncing as well, since there's
> > > nothing special we have to do on completion to clean it up.
> > 
> > ok. I just made it like the existing blk_rq_map_user which made the caller
> > do
> > those things.
> > 
> > > 
> > > I also think we might need a blk_rq_kern_iovec call that would take a
> > > vector of user I/O's and map it to a multiple bio request.  This would
> > 
> > Does it need to be a multiple bio request? A single bio should be able to
> > handle
> >  a request's segments and sectors limits.
> >  
> > Will the user assure that the iovec will fit in a single request to handle a
> > case where the iovec is greater than the phys or hw segment limits though?
> > 
> 
> scsi_do/wait_req could do the checking and submit mutliple requests for sg I
> mean.

No, it can't do that. If the user submits one SCSI command, it must result 
in one SCSI command to the device. Otherwise the effect is not what the 
user wants. (You can split a multiple block read/write but this does not 
apply to all commands.)

Michael's question is important. The number of sg segments a HBA supports 
determines the maximum SCSI data size. In some cases (e.g., tape 
reads and writes with multimegabyte blocks) using page size (e.g., 4 kB) 
segments does not allow large enough data size. One solution has been to 
have a kernel space buffer that consists of segments spanning several 
pages. As far as I know, the current bio code requires page size segments. 
It is possible to use chained bios with multimegabyte buffers but the 
user should be sure that the split segments will be merged before the 
request reaches the HBA so that the request fits the HBA sg segment limit.

-- 
Kai

  reply	other threads:[~2005-06-07 16:23 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-04  1:19 [PATCH RFC 0/4] use scatter lists for all block pc requests and simplify hw handlers Mike Christie
2005-06-04 16:07 ` James Bottomley
2005-06-05  7:15   ` Mike Christie
2005-06-05  9:41     ` [dm-devel] " christophe varoqui
2005-06-06 13:31       ` Lars Marowsky-Bree
2005-06-07  0:04         ` Michael Christie
2005-06-07  7:01           ` [dm-devel] " Lars Marowsky-Bree
2005-06-05 14:40     ` James Bottomley
2005-06-05 19:11       ` James Bottomley
2005-06-06  5:43         ` Douglas Gilbert
2005-06-06 14:19           ` James Bottomley
2005-06-07 13:08             ` Douglas Gilbert
2005-06-07 13:34               ` Tony Battersby
2005-06-07 16:34                 ` James Bottomley
2005-06-07 18:38                   ` [PATCH RFC 0/4] use scatter lists for all blockpc " Tony Battersby
2005-06-07 18:43                     ` Jens Axboe
2005-06-07 15:59               ` [PATCH RFC 0/4] use scatter lists for all block pc " James Bottomley
2005-06-07 18:07                 ` Jens Axboe
2005-06-07 19:26                   ` James Bottomley
2005-06-08  7:09                     ` Jens Axboe
2005-06-06 19:02     ` Patrick Mansfield
2005-06-07 15:26       ` Michael Christie
2005-06-07 18:23         ` Patrick Mansfield
2005-06-08 15:41           ` Mike Christie
2005-06-09  0:08             ` Patrick Mansfield
2005-06-09  6:18               ` Jens Axboe
2005-06-09 11:51                 ` James Bottomley
2005-06-09 11:54                   ` Jens Axboe
2005-06-07 12:10   ` Christoph Hellwig
2005-06-07 12:20     ` James Bottomley
2005-06-07 15:36       ` Michael Christie
2005-06-07 15:45         ` [dm-devel] " Michael Christie
2005-06-07 16:26           ` Kai Makisara [this message]
2005-06-07 19:23             ` James Bottomley
2005-06-07 18:09         ` Jens Axboe
2005-06-08 12:46           ` Mike Christie
2005-06-07 18:07 ` Jens Axboe
2005-06-07 19:38   ` James Bottomley
2005-06-08  3:00     ` Douglas Gilbert
2005-06-08 12:59       ` James Bottomley
2005-06-08 14:50         ` Luben Tuikov

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=Pine.LNX.4.61.0506071914360.3034@kai.makisara.local \
    --to=kai.makisara@kolumbus.fi \
    --cc=James.Bottomley@SteelEye.com \
    --cc=axboe@suse.de \
    --cc=dm-devel@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.