On Thu, Dec 13, 2007 at 09:09:59PM +0100, Jens Axboe wrote: > > >diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c > > >index e30b1a4..1e34b6f 100644 > > >--- a/block/ll_rw_blk.c > > >+++ b/block/ll_rw_blk.c > > >@@ -1349,6 +1351,8 @@ new_segment: > > > sg = sg_next(sg); > > > } > > > > > >+ if (bvprv && (page_address(bvprv->bv_page) + > > >bvprv->bv_len == page_address(bvec->bv_page))) > > >+ printk("missed merge\n"); > > > sg_set_page(sg, bvec->bv_page, nbytes, > > > bvec->bv_offset); > > > nsegs++; > > > } > > > > > .. > > > > Yeah, the first part is similar to my own hack. > > > > For testing, try "dd if=/dev/sda of=/dev/null bs=4096k". > > That *really* should end up using contiguous pages on most systems. > > > > I figured out the git thing, and am now building some in-between kernels to > > try. > > OK, it's a vm issue, I have tens of thousand "backward" pages after a > boot - IOW, bvec->bv_page is the page before bvprv->bv_page, not > reverse. So it looks like that bug got reintroduced. Perhaps we should ask the -mm folks if they happen to have an idea what caused it ... Background: we're seeing pages allocated in reverse order after boot. This causes IO performance problems on machines without IOMMUs as we can't merge pages when they're allocated in the wrong order. This is something that went wrong between 2.6.23 and 2.6.24-rc5. Bill Irwin had a patch that fixed this; it was merged months ago, but the effects of it seem to have been undone. -- Intel are signing my paycheques ... these opinions are still mine "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." - 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