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 Yes Tomo

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

2007-07-07 Thread James Bottomley
On Sat, 2007-07-07 at 11:27 -0400, Jeff Garzik wrote: 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

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

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 Tomo found it at ata_scsi_slave_config(). Attached below the way I fixed it. Now

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 requests Date: Thu, 17 May 2007 17:00:21 +0300 Yes Tomo found

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 127. I think

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: +#define

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: +#define scsi_resid(cmd) ((cmd)-sg_table-resid) This doesn't work

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 found is: +#define scsi_resid(cmd) ((cmd)-sg_table-resid

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 support for block pc requests Date: Wed

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] Subject: Re: [PATCH v2] add bidi support for block

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 ios that

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 requests Date: Thu, 17 May 2007 07:48:13

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 requests Date: Thu, 17 May 2007 07:48:13

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 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_SEGMENTS to

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 bootup. The machine

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 it works with 127. I think that we can

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] Subject: Re: [PATCH v2] add bidi support for block pc requests Date

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 you mean.

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. This is a grate

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 are

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 higher

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: There's actually a fourth option you haven't considered

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 wrote: James Bottomley wrote: There's

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 bytes it

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: 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 to free them from the internal

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 support for block pc requests Date: Wed, 09 May 2007 19

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 scsi_for_each_sg(cmd, nseg, i

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 From: Boaz Harrosh [EMAIL PROTECTED] Subject: Re: [PATCH v2] add bidi support

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-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. We're getting very close

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. We're getting very close

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_sg and sglist_len) into the sgtable pools. We're

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 requests Date: Wed, 09 May 2007 10:46

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 the

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:

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

[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: