linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Jens Axboe <jens.axboe@oracle.com>, linux-mm@kvack.org
Cc: Mark Lord <liml@rtr.ca>, Mark Lord <lkml@rtr.ca>,
	IDE/ATA development list <linux-ide@vger.kernel.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: VM allocates pages in reverse order again
Date: Thu, 13 Dec 2007 15:02:30 -0700	[thread overview]
Message-ID: <20071213220230.GR26334@parisc-linux.org> (raw)
In-Reply-To: <20071213200958.GK10104@kernel.dk>

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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      parent reply	other threads:[~2007-12-13 22:02 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20071213185326.GQ26334@parisc-linux.org>
     [not found] ` <4761821F.3050602@rtr.ca>
     [not found]   ` <20071213192633.GD10104@kernel.dk>
     [not found]     ` <4761883A.7050908@rtr.ca>
     [not found]       ` <476188C4.9030802@rtr.ca>
     [not found]         ` <20071213193937.GG10104@kernel.dk>
     [not found]           ` <47618B0B.8020203@rtr.ca>
     [not found]             ` <20071213195350.GH10104@kernel.dk>
     [not found]               ` <20071213200219.GI10104@kernel.dk>
     [not found]                 ` <476190BE.9010405@rtr.ca>
     [not found]                   ` <20071213200958.GK10104@kernel.dk>
2007-12-13 22:02                     ` QUEUE_FLAG_CLUSTER: not working in 2.6.24 ? Andrew Morton
2007-12-13 22:15                       ` James Bottomley
2007-12-13 22:29                         ` Andrew Morton
2007-12-13 22:33                           ` Mark Lord
2007-12-13 23:13                             ` Mark Lord
2007-12-14  0:05                               ` Mark Lord
2007-12-14  0:30                                 ` Mark Lord
2007-12-14  0:37                                   ` Andrew Morton
2007-12-14  0:42                                     ` Mark Lord
2007-12-14  0:46                                       ` [PATCH] fix page_alloc for larger I/O segments (improved) Mark Lord
2007-12-14  0:57                                         ` James Bottomley
2007-12-14  1:11                                           ` Andrew Morton
2007-12-14  2:23                                             ` Mark Lord
2007-12-14 17:42                                         ` Mel Gorman
2007-12-14 18:07                                           ` Mark Lord
2007-12-16 21:56                                             ` Mel Gorman
2007-12-14 18:13                                           ` Matthew Wilcox
2007-12-14 18:30                                             ` Mark Lord
2007-12-20 22:37                                             ` Matthew Wilcox
2007-12-14  0:47                                       ` QUEUE_FLAG_CLUSTER: not working in 2.6.24 ? Mark Lord
2007-12-14 11:50                                     ` Mel Gorman
2007-12-14 13:57                                       ` Mark Lord
2007-12-14  0:40                                   ` [PATCH] fix page_alloc for larger I/O segments Mark Lord
2007-12-14  1:03                                     ` Andrew Morton
2007-12-14  4:00                                       ` Matthew Wilcox
2007-12-15  1:09                           ` QUEUE_FLAG_CLUSTER: not working in 2.6.24 ? Mel Gorman
2007-12-15  2:02                             ` Andrew Morton
2007-12-15  5:55                               ` Matt Mackall
2007-12-16 21:55                               ` Mel Gorman
2007-12-17 19:24                                 ` Randy Dunlap
2007-12-18  2:42                                   ` Matt Mackall
2007-12-13 22:17                       ` Jens Axboe
2007-12-13 22:02                     ` Matthew Wilcox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071213220230.GR26334@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=jens.axboe@oracle.com \
    --cc=liml@rtr.ca \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lkml@rtr.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).