Douglas Gilbert wrote: > Brian King wrote: >> The problem appears to be in the definition of SG_SCATTER_SZ. The comment >> states that it must be a power of 2, must be less than PAGE_SIZE * 32, >> and must be at least as large as PAGE_SIZE. For 64k pages, this is not >> true. Increasing SG_SCATTER_SZ to 64k fixed the oops in my configuration. >> >> Signed-off-by: Brian King <brking@xxxxxxxxxx> >> --- >> >> linux-2.6-bjking1/include/scsi/sg.h | 2 +- >> 1 files changed, 1 insertion(+), 1 deletion(-) >> >> diff -puN include/scsi/sg.h~sg_large_page_support include/scsi/sg.h >> --- linux-2.6/include/scsi/sg.h~sg_large_page_support 2006-09-19 09:24:06.000000000 -0500 >> +++ linux-2.6-bjking1/include/scsi/sg.h 2006-09-19 09:27:00.000000000 -0500 >> @@ -238,7 +238,7 @@ typedef struct sg_req_info { /* used by >> #define SG_GET_ACCESS_COUNT 0x2289 >> >> >> -#define SG_SCATTER_SZ (8 * 4096) /* PAGE_SIZE not available to user */ >> +#define SG_SCATTER_SZ (16 * 4096) /* PAGE_SIZE not available to user */ >> /* Largest size (in bytes) a single scatter-gather list element can have. >> The value must be a power of 2 and <= (PAGE_SIZE * 32) [131072 bytes on >> i386]. The minimum value is PAGE_SIZE. If scatter-gather not supported >> _ > > Brian, > Yes that obviously needs to be fixed. However the patch > is a bit fragile, for example if some architecture decides > to have an option for 128 KB page size or larger. I agree. > I've got a patch to add a sysfs/boottime attribute for > setting max_scatter_elem_sz. If that logic made an additional > check, adjusting max_scatter_elem_sz up to PAGE_SIZE if > necessary. The SG_SCATTER_SZ define could stay as is, > apart from an additional note that it will be forced to > PAGE_SIZE if necessary. You forgot to attach the patch ;) Is this something you plan to be submitting soon? Thanks, Brian -- Brian King eServer Storage I/O IBM Linux Technology Center - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html