Re: [PATCH v2] add bidi support for block pc requests

2007-07-07 Thread Jeff Garzik
James Bottomley wrote: On Sat, 2007-07-07 at 11:27 -0400, Jeff Garzik wrote: LIBATA_MAX_PRD is the maximum number of DMA scatter/gather elements permitted by the HBA's DMA engine, for a single ATA command. Then it's the wrong parameter you're setting: phys_segments is what you have going int

Re: [PATCH v2] add bidi support for block pc requests

2007-07-07 Thread James Bottomley
Boaz Harrosh <[EMAIL PROTECTED]> > >>>>> Subject: Re: [PATCH v2] add bidi support for block pc requests > >>>>> Date: Thu, 17 May 2007 17:00:21 +0300 > >>>>> > >>>>>> Yes Tomo found it at ata_scsi_slave_config().

Re: [PATCH v2] add bidi support for block pc requests

2007-07-07 Thread Jeff Garzik
James Bottomley wrote: On Sun, 2007-06-03 at 10:45 +0300, Boaz Harrosh wrote: Jeff Garzik wrote: Boaz Harrosh wrote: FUJITA Tomonori wrote: From: Boaz Harrosh <[EMAIL PROTECTED]> Subject: Re: [PATCH v2] add bidi support for block pc requests Date: Thu, 17 May 2007 17:00:21 +0300 Ye

Re: [PATCH v2] add bidi support for block pc requests

2007-06-03 Thread James Bottomley
On Sun, 2007-06-03 at 10:45 +0300, Boaz Harrosh wrote: > Jeff Garzik wrote: > > Boaz Harrosh wrote: > >> FUJITA Tomonori wrote: > >>> From: Boaz Harrosh <[EMAIL PROTECTED]> > >>> Subject: Re: [PATCH v2] add bidi support for block pc requ

Re: [PATCH v2] add bidi support for block pc requests

2007-06-03 Thread Boaz Harrosh
Jeff Garzik wrote: > Boaz Harrosh wrote: >> FUJITA Tomonori wrote: >>> From: Boaz Harrosh <[EMAIL PROTECTED]> >>> Subject: Re: [PATCH v2] add bidi support for block pc requests >>> Date: Thu, 17 May 2007 17:00:21 +0300 >>> >>>> Yes Tom

Re: [PATCH v2] add bidi support for block pc requests

2007-06-01 Thread Jeff Garzik
Boaz Harrosh wrote: FUJITA Tomonori wrote: From: Boaz Harrosh <[EMAIL PROTECTED]> Subject: Re: [PATCH v2] add bidi support for block pc requests Date: Thu, 17 May 2007 17:00:21 +0300 Yes Tomo found it at ata_scsi_slave_config(). Attached below the way I fixed it. Now it works with 1

Re: [PATCH v2] add bidi support for block pc requests

2007-05-24 Thread Boaz Harrosh
FUJITA Tomonori wrote: > From: Boaz Harrosh <[EMAIL PROTECTED]> > Subject: Re: [PATCH v2] add bidi support for block pc requests > Date: Thu, 24 May 2007 19:37:06 +0300 > >> FUJITA Tomonori wrote: >>>> FUJITA Tomonori wrote: >>> One thing that I fou

Re: [PATCH v2] add bidi support for block pc requests

2007-05-24 Thread FUJITA Tomonori
From: Boaz Harrosh <[EMAIL PROTECTED]> Subject: Re: [PATCH v2] add bidi support for block pc requests Date: Thu, 24 May 2007 19:37:06 +0300 > FUJITA Tomonori wrote: > >> FUJITA Tomonori wrote: > > > > One thing that I found is: > > > > +#defi

Re: [PATCH v2] add bidi support for block pc requests

2007-05-24 Thread Boaz Harrosh
Boaz Harrosh wrote: > FUJITA Tomonori wrote: >>> FUJITA Tomonori wrote: >> One thing that I found is: >> >> +#define scsi_resid(cmd) ((cmd)->sg_table->resid) >> >> >> This doesn't work for some drivers (at least ipr) since they set >> cmd->resid even with commands without data transfer. >> > > Jam

Re: [PATCH v2] add bidi support for block pc requests

2007-05-24 Thread Boaz Harrosh
FUJITA Tomonori wrote: >> FUJITA Tomonori wrote: > > One thing that I found is: > > +#define scsi_resid(cmd) ((cmd)->sg_table->resid) > > > This doesn't work for some drivers (at least ipr) since they set > cmd->resid even with commands without data transfer. > James, Tomo. the last accessor

Re: [PATCH v2] add bidi support for block pc requests

2007-05-17 Thread Benny Halevy
FUJITA Tomonori wrote: > From: Boaz Harrosh <[EMAIL PROTECTED]> > Subject: Re: [PATCH v2] add bidi support for block pc requests > Date: Thu, 17 May 2007 11:49:37 +0300 > >> FUJITA Tomonori wrote: >>> From: Jens Axboe <[EMAIL PROTECTED]> >>> Subje

Re: [PATCH v2] add bidi support for block pc requests

2007-05-17 Thread Boaz Harrosh
FUJITA Tomonori wrote: > From: Boaz Harrosh <[EMAIL PROTECTED]> > Subject: Re: [PATCH v2] add bidi support for block pc requests > Date: Thu, 17 May 2007 17:00:21 +0300 > >> Yes Tomo found it at ata_scsi_slave_config(). Attached below the way I >> fixed it. Now i

Re: [PATCH v2] add bidi support for block pc requests

2007-05-17 Thread FUJITA Tomonori
From: Boaz Harrosh <[EMAIL PROTECTED]> Subject: Re: [PATCH v2] add bidi support for block pc requests Date: Thu, 17 May 2007 17:00:21 +0300 > James Bottomley wrote: > > On Thu, 2007-05-17 at 11:49 +0300, Boaz Harrosh wrote: > >> These are regular fs (ext3) requests during

Re: [PATCH v2] add bidi support for block pc requests

2007-05-17 Thread Boaz Harrosh
James Bottomley wrote: > On Thu, 2007-05-17 at 11:49 +0300, Boaz Harrosh wrote: >> These are regular fs (ext3) requests during bootup. The machine will not >> boot. (Usually from the read ahead code) >> Don't believe me look at the second patch Over Tomo's cleanup. >> If I define SCSI_MAX_SG_SEGMEN

Re: [PATCH v2] add bidi support for block pc requests

2007-05-17 Thread James Bottomley
On Thu, 2007-05-17 at 11:49 +0300, Boaz Harrosh wrote: > These are regular fs (ext3) requests during bootup. The machine will not > boot. (Usually from the read ahead code) > Don't believe me look at the second patch Over Tomo's cleanup. > If I define SCSI_MAX_SG_SEGMENTS to 127 it will crash even

Re: [PATCH v2] add bidi support for block pc requests

2007-05-17 Thread FUJITA Tomonori
From: Boaz Harrosh <[EMAIL PROTECTED]> Subject: Re: [PATCH v2] add bidi support for block pc requests Date: Thu, 17 May 2007 11:49:37 +0300 > FUJITA Tomonori wrote: > > From: Jens Axboe <[EMAIL PROTECTED]> > > Subject: Re: [PATCH v2] add bidi support for block pc req

Re: [PATCH v2] add bidi support for block pc requests

2007-05-17 Thread FUJITA Tomonori
From: Boaz Harrosh <[EMAIL PROTECTED]> Subject: Re: [PATCH v2] add bidi support for block pc requests Date: Thu, 17 May 2007 11:49:37 +0300 > FUJITA Tomonori wrote: > > From: Jens Axboe <[EMAIL PROTECTED]> > > Subject: Re: [PATCH v2] add bidi support for block pc req

Re: [PATCH v2] add bidi support for block pc requests

2007-05-17 Thread Boaz Harrosh
FUJITA Tomonori wrote: > From: Jens Axboe <[EMAIL PROTECTED]> > Subject: Re: [PATCH v2] add bidi support for block pc requests > Date: Thu, 17 May 2007 07:48:13 +0200 > >> On Thu, May 17 2007, FUJITA Tomonori wrote: >>> From: Jens Axboe <[EMAIL PROTECTED]&g

Re: [PATCH v2] add bidi support for block pc requests

2007-05-17 Thread Boaz Harrosh
Jens Axboe wrote: > On Wed, May 16 2007, James Bottomley wrote: >> On Wed, 2007-05-16 at 19:53 +0200, Jens Axboe wrote: >>> The 1-page thing isn't a restriction as such, it's just an optimization. >>> The scatterlist allocated is purely a kernel entity, so you could do 4 >>> contig pages and larger

Re: [PATCH v2] add bidi support for block pc requests

2007-05-17 Thread FUJITA Tomonori
From: Jens Axboe <[EMAIL PROTECTED]> Subject: Re: [PATCH v2] add bidi support for block pc requests Date: Thu, 17 May 2007 07:48:13 +0200 > On Thu, May 17 2007, FUJITA Tomonori wrote: > > From: Jens Axboe <[EMAIL PROTECTED]> > > Subject: Re: [PATCH v2] add bidi su

Re: [PATCH v2] add bidi support for block pc requests

2007-05-16 Thread Jens Axboe
On Thu, May 17 2007, FUJITA Tomonori wrote: > From: Jens Axboe <[EMAIL PROTECTED]> > Subject: Re: [PATCH v2] add bidi support for block pc requests > Date: Wed, 16 May 2007 19:53:22 +0200 > > > On Wed, May 16 2007, Boaz Harrosh wrote: > > > Boaz Harrosh wro

Re: [PATCH v2] add bidi support for block pc requests

2007-05-16 Thread FUJITA Tomonori
From: Jens Axboe <[EMAIL PROTECTED]> Subject: Re: [PATCH v2] add bidi support for block pc requests Date: Wed, 16 May 2007 19:53:22 +0200 > On Wed, May 16 2007, Boaz Harrosh wrote: > > Boaz Harrosh wrote: > > > James Bottomley wrote: > > >> > > >&

Re: [PATCH v2] add bidi support for block pc requests

2007-05-16 Thread Jens Axboe
On Wed, May 16 2007, James Bottomley wrote: > On Wed, 2007-05-16 at 19:53 +0200, Jens Axboe wrote: > > The 1-page thing isn't a restriction as such, it's just an optimization. > > The scatterlist allocated is purely a kernel entity, so you could do 4 > > contig pages and larger ios that way, if hig

Re: [PATCH v2] add bidi support for block pc requests

2007-05-16 Thread James Bottomley
On Wed, 2007-05-16 at 19:53 +0200, Jens Axboe wrote: > The 1-page thing isn't a restriction as such, it's just an optimization. > The scatterlist allocated is purely a kernel entity, so you could do 4 > contig pages and larger ios that way, if higher order allocations were > reliable. > > But you

Re: [PATCH v2] add bidi support for block pc requests

2007-05-16 Thread Jens Axboe
On Wed, May 16 2007, Boaz Harrosh wrote: > Boaz Harrosh wrote: > > James Bottomley wrote: > >> > >> There's actually a fourth option you haven't considered: > >> > >> Roll all the required sglist definitions (request_bufflen, > >> request_buffer, use_sg and sglist_len) into the sgtable pools. > >>

Re: [PATCH v2] add bidi support for block pc requests

2007-05-16 Thread Boaz Harrosh
Boaz Harrosh wrote: > James Bottomley wrote: >> >> There's actually a fourth option you haven't considered: >> >> Roll all the required sglist definitions (request_bufflen, >> request_buffer, use_sg and sglist_len) into the sgtable pools. >> > This is a grate Idea. Let me see if I understand what

Re: [PATCH v2] add bidi support for block pc requests

2007-05-11 Thread James Bottomley
On Thu, 2007-05-10 at 11:10 -0400, Douglas Gilbert wrote: > > +#define scsi_resid(cmd) ((cmd)->resid) > > I have defined resid in the past as a signed (32 bit) > integer following the CAM spec. The cases are: >- resid=0 : initiator's DMA engine got (or sent?) the >number of byt

Re: [PATCH v2] add bidi support for block pc requests

2007-05-10 Thread Boaz Harrosh
Douglas Gilbert wrote: > Boaz Harrosh wrote: >> FUJITA Tomonori wrote: >>> From: FUJITA Tomonori <[EMAIL PROTECTED]> >>> Subject: Re: [PATCH v2] add bidi support for block pc requests >>> Date: Thu, 10 May 2007 15:53:22 +0900 >>> >>>>

Re: [PATCH v2] add bidi support for block pc requests

2007-05-10 Thread Douglas Gilbert
Boaz Harrosh wrote: > FUJITA Tomonori wrote: >> From: FUJITA Tomonori <[EMAIL PROTECTED]> >> Subject: Re: [PATCH v2] add bidi support for block pc requests >> Date: Thu, 10 May 2007 15:53:22 +0900 >> >>> From: Boaz Harrosh <[EMAIL PROTECTED]> >&g

Re: [PATCH v2] add bidi support for block pc requests

2007-05-10 Thread FUJITA Tomonori
From: Boaz Harrosh <[EMAIL PROTECTED]> Subject: Re: [PATCH v2] add bidi support for block pc requests Date: Thu, 10 May 2007 15:37:48 +0300 > > +/* moved to scatterlist.h after chaining sg */ > > +#define sg_next(sg) ((sg) + 1) > > + > > +#define

Re: [PATCH v2] add bidi support for block pc requests

2007-05-10 Thread Boaz Harrosh
FUJITA Tomonori wrote: > From: FUJITA Tomonori <[EMAIL PROTECTED]> > Subject: Re: [PATCH v2] add bidi support for block pc requests > Date: Thu, 10 May 2007 15:53:22 +0900 > >> From: Boaz Harrosh <[EMAIL PROTECTED]> >> Subject: Re: [PATCH v2] add bidi suppor

Re: [PATCH v2] add bidi support for block pc requests

2007-05-10 Thread FUJITA Tomonori
From: FUJITA Tomonori <[EMAIL PROTECTED]> Subject: Re: [PATCH v2] add bidi support for block pc requests Date: Thu, 10 May 2007 15:53:22 +0900 > From: Boaz Harrosh <[EMAIL PROTECTED]> > Subject: Re: [PATCH v2] add bidi support for block pc requests > Date: Wed, 09 Ma

Re: [PATCH v2] add bidi support for block pc requests

2007-05-09 Thread FUJITA Tomonori
From: Boaz Harrosh <[EMAIL PROTECTED]> Subject: Re: [PATCH v2] add bidi support for block pc requests Date: Wed, 09 May 2007 19:54:32 +0300 > James Bottomley wrote: > > Actually, the first order of business is to use accessors on the command > > pointers in the drivers

Re: [PATCH v2] add bidi support for block pc requests

2007-05-09 Thread Boaz Harrosh
James Bottomley wrote: > Actually, the first order of business is to use accessors on the command > pointers in the drivers to free them from the internal layout of the > structure (and where it is allocated). > Thanks! I totally second that. Let me look into my old patches and come up with all th

Re: [PATCH v2] add bidi support for block pc requests

2007-05-09 Thread FUJITA Tomonori
From: Boaz Harrosh <[EMAIL PROTECTED]> Subject: Re: [PATCH v2] add bidi support for block pc requests Date: Wed, 09 May 2007 16:58:24 +0300 > FUJITA Tomonori wrote: > > From: Boaz Harrosh <[EMAIL PROTECTED]> > > Subject: Re: [PATCH v2] add bidi support for block pc req

Re: [PATCH v2] add bidi support for block pc requests

2007-05-09 Thread James Bottomley
On Wed, 2007-05-09 at 16:58 +0300, Boaz Harrosh wrote: > >> 1. An sgtable is a single allocation with an sgtable header type > >>at the begining and a veriable size array of struct scatterlist. > >>something like: > >>struct sgtable { > >>struct sgtable_header { > >>

Re: [PATCH v2] add bidi support for block pc requests

2007-05-09 Thread Boaz Harrosh
FUJITA Tomonori wrote: > From: Boaz Harrosh <[EMAIL PROTECTED]> > Subject: Re: [PATCH v2] add bidi support for block pc requests > Date: Wed, 09 May 2007 10:46:34 +0300 > >>> Roll all the required sglist definitions (request_bufflen, >>> request_buffer, use

Re: [PATCH v2] add bidi support for block pc requests

2007-05-09 Thread FUJITA Tomonori
From: Boaz Harrosh <[EMAIL PROTECTED]> Subject: Re: [PATCH v2] add bidi support for block pc requests Date: Wed, 09 May 2007 10:46:34 +0300 > > Roll all the required sglist definitions (request_bufflen, > > request_buffer, use_sg and sglist_len) into the sgtable pools. > >

Re: [PATCH v2] add bidi support for block pc requests

2007-05-09 Thread FUJITA Tomonori
From: James Bottomley <[EMAIL PROTECTED]> Subject: Re: [PATCH v2] add bidi support for block pc requests Date: Tue, 08 May 2007 15:01:37 -0500 > Roll all the required sglist definitions (request_bufflen, > request_buffer, use_sg and sglist_len) into the sgtable pools. > >

Re: [PATCH v2] add bidi support for block pc requests

2007-05-09 Thread Boaz Harrosh
James Bottomley wrote: > I think you'll find that kzalloc comes directly out of a slab for this > size of allocation anyway ... you mean you want to see a dedicated pool > for this specific allocation? Yes, As you said below so we can always send IO for "forward progress of freeing memory". My test

Re: [PATCH v2] add bidi support for block pc requests

2007-05-08 Thread James Bottomley
On Tue, 2007-05-08 at 21:53 +0300, Boaz Harrosh wrote: > Before I get to my main concern here I have one comment. in > scsi_get_cmd_from_req() > there is a code path in which a scsi_cmnd is taken from special and is not > newly > allocated. It is best to move bidi allocation to scsi_get_cmd_from_

Re: [PATCH v2] add bidi support for block pc requests

2007-05-08 Thread Boaz Harrosh
FUJITA Tomonori wrote: > Here is an updated version of the patch to add bidi support to block > pc requests. Bugs spotted by Benny were fixed. > > This patch can be applied cleanly to the scsi-misc git tree and is on > the top of the following patch to add linked request support: > > http://marc.

[PATCH v2] add bidi support for block pc requests

2007-05-07 Thread FUJITA Tomonori
Here is an updated version of the patch to add bidi support to block pc requests. Bugs spotted by Benny were fixed. This patch can be applied cleanly to the scsi-misc git tree and is on the top of the following patch to add linked request support: http://marc.info/?l=linux-scsi&m=117835587615642&