linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mel@csn.ul.ie>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Nishanth Aravamudan <nacc@us.ibm.com>,
	clameter@sgi.com, apw@shadowen.org,
	kosaki.motohiro@jp.fujitsu.com, linux-mm@kvack.org
Subject: Re: [PATCH] Smarter retry of costly-order allocations
Date: Tue, 15 Apr 2008 10:27:17 +0100	[thread overview]
Message-ID: <20080415092717.GC20316@csn.ul.ie> (raw)
In-Reply-To: <20080415020220.0a6998e2.akpm@linux-foundation.org>

On (15/04/08 02:02), Andrew Morton didst pronounce:
> On Tue, 15 Apr 2008 09:51:55 +0100 Mel Gorman <mel@csn.ul.ie> wrote:
> 
> > On (11/04/08 16:35), Nishanth Aravamudan didst pronounce:
> > > Because of page order checks in __alloc_pages(), hugepage (and similarly
> > > large order) allocations will not retry unless explicitly marked
> > > __GFP_REPEAT. However, the current retry logic is nearly an infinite
> > > loop (or until reclaim does no progress whatsoever). For these costly
> > > allocations, that seems like overkill and could potentially never
> > > terminate.
> > > 
> > > Modify try_to_free_pages() to indicate how many pages were reclaimed.
> > > Use that information in __alloc_pages() to eventually fail a large
> > > __GFP_REPEAT allocation when we've reclaimed an order of pages equal to
> > > or greater than the allocation's order. This relies on lumpy reclaim
> > > functioning as advertised. Due to fragmentation, lumpy reclaim may not
> > > be able to free up the order needed in one invocation, so multiple
> > > iterations may be requred. In other words, the more fragmented memory
> > > is, the more retry attempts __GFP_REPEAT will make (particularly for
> > > higher order allocations).
> > > 
> > > Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> > 
> > Changelog is a lot clearer now. Thanks.
> > 
> > Tested-by: Mel Gorman <mel@csn.ul.ie>
> 
> Tested in what way though?
> 

It was tested as part of the full patchset as hugepage allocations was the
easiest trigger for __GFP_REPEAT usage. It was based on 2.6.25-rc9. Test
was as follows

1. kernbench as a smoke-test
2. hugetlbcap test
	1. Build 6 trees simultaneously on a 512MB laptop
		(should have caught if pagetable allocations getting broken
		 by the change in __GFP_REPEAT semantics)
	2. Allocate hugepages via proc under load
	3. Kill all compile jobs
	4. Allocate hugepages at rest
3. Run hugepages_get test which is the output I posted as part of patch 3

The main check was to see if pagetable allocations were getting messed
up. I didn't notice a problem on the laptop, but it's 1-way so I've
started tests on larger machines just in case.

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

--
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>

      reply	other threads:[~2008-04-15  9:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-11 23:35 [PATCH 1/3] mm: fix misleading __GFP_REPEAT related comments Nishanth Aravamudan
2008-04-11 23:35 ` [PATCH] Smarter retry of costly-order allocations Nishanth Aravamudan
2008-04-11 23:36   ` [PATCH 3/3] Explicitly retry hugepage allocations Nishanth Aravamudan
2008-04-15  8:56     ` Mel Gorman
2008-04-17  1:40       ` [UPDATED][PATCH " Nishanth Aravamudan
2008-04-15  7:07   ` [PATCH] Smarter retry of costly-order allocations Andrew Morton
2008-04-15 17:26     ` Nishanth Aravamudan
2008-04-15 19:18       ` Andrew Morton
2008-04-16  0:00         ` Nishanth Aravamudan
2008-04-16  0:09           ` Andrew Morton
2008-04-17  1:39             ` [UPDATED][PATCH 2/3] " Nishanth Aravamudan
2008-04-15  8:51   ` [PATCH] " Mel Gorman
2008-04-15  9:02     ` Andrew Morton
2008-04-15  9:27       ` Mel Gorman [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=20080415092717.GC20316@csn.ul.ie \
    --to=mel@csn.ul.ie \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=clameter@sgi.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=nacc@us.ibm.com \
    /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).