64 nr_segments per request limitation?

From: Raju Kurunkad Vasudevan (raju.kurunkad@wipro.com)
Date: Tue May 23 2000 - 07:49:03 EST


hi,

I am writing a RAID controller driver. It is designed as a block driver.
It can handle up to 256 scatter-gather fragments and 2048 blocks per
request.

I update these values in the max_sectors (max no of blocks/command) and
max_segments (max no SG frags/command) arrays for each of the minor nos.
Initially, I had set the blksize_size array to 1024 for every minor no.

relevant code :
---------------------------------------------------------------------------------
for (minor_num = 0; minor_num < MAX_MINOR_COUNT ; minor_num++) {
                /* controller->block_sizes[minor_num] = BLOCK_SIZE; */
                controller->block_sizes[minor_num] = 4096;
                controller->sectsperreq[minor_num] = 2048;
                controller->maxsgfrags[minor_num] = 256;
        }

        blksize_size[major_num] = controller->block_sizes;
        max_sectors[major_num] = controller->sectsperreq;
        max_segments[major_num] = controller->maxsgfrags;
---------------------------------------------------------------------------------

But when I get a write for say 500kb only 64kb is written. Also this
write will take place in 1 request. But when I issue a read for 500kb
immediately after the write, I get 8 requests, 7 of them of 64kb and the
last one with 52 kb.

Now I set the blksize_size array to 4096 for every minor no. Now when I
issue a 500kb write only 256kb is written. Issuing a read for 500kb will
result in 2 request, 1st one with 256 kb and 2nd one with 244 kb.

For testing I am bypassing forcing write/read from disk by calling
invalidate_buffes().

so is there any limitation on the no. of SG-frags/command? becos in both
the case maximum IO size looks like (blksize_size[minor_num] * 64) ie
1024*64 in 1st case and 4096*64 in 2nd case.

If anybody faced the same problem, can you please suggest the solution?

Thanks in advance,
Raju
ps: please cc me in ur replies

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



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:23 EST