On Fri, 2010-04-09 at 22:05 -0400, Martin K. Petersen wrote: > >>>>> "Robert" == Robert Hancock <hancockrwd@xxxxxxxxx> writes: > > >> Did I miss something to make the block layer generate bigger size > >> data for every request in the request queue? Below is part of my > >> source code. Any comments are highly appreciated. Thank you in > >> advance. > > Robert> 8 sectors is 4KB, that's the size of a page. If the pages that > Robert> are being written are not physically contiguous that may be the > Robert> best the block layer can do with the constraints you've given it > Robert> (not supporting any more than 1 DMA segment). > > Correct. It's quite unlikely for pages to be contiguous so this is the > best we can do. Actually, average servers do about 50% contiguous on average since we changed the mm layer to allocate in ascending physical page order ... this figure is highly sensitive to mm changes though, and can vary from release to release. Just in case anyone is thinking of it, there's no way we'd alter the block layer to copy into physically contiguous since the overhead would be pretty horrific. However, if the platform has an iommu, you can use it to map physically discontinuous to bus contiguous and fit everything into a single sg element. > Having recently done a cleanup of our segment handling I became aware > that there are many MMC devices that are single-element only. This was > probably a sufficient approach for 32MB devices but it's time to get > with the program and implement proper scatter-gather. James -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html