All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mel Gorman <mel@csn.ul.ie>
To: Round Robinjp <roundrobinjp@yahoo.co.jp>
Cc: linux-mm@kvack.org, iram.shahzad@jp.fujitsu.com
Subject: Re: compaction: why depends on HUGETLB_PAGE
Date: Fri, 30 Jul 2010 17:49:57 +0100	[thread overview]
Message-ID: <20100730164957.GH3571@csn.ul.ie> (raw)
In-Reply-To: <20100730164414.88965.qmail@web4208.mail.ogk.yahoo.co.jp>

On Sat, Jul 31, 2010 at 01:44:09AM +0900, Round Robinjp wrote:
> > > Please could you elaborate a little more why depending on
> > > compaction to satisfy other high-order allocation is not good.
> > >
> > 
> > At the very least, it's not a situation that has been tested heavily and
> > because other high-order allocations are typically not movable. In the
> > worst case, if they are both frequent and long-lived they *may* eventually
> > encounter fragmentation-related problems. This uncertainity is why it's
> > not good. It gets worse if there is no swap as eventually all movable pages
> > will be compacted as much as possible but there still might not be enough
> > contiguous memory for a high-order page because other pages are pinned.
> 
> I am interested in this topic too.
> 
> How about using compaction for infrequent short-lived
> high-order allocations?

Depend on MIGRATE_RESERVE instead within fragmentation avoidance. It's
objective is to keep certain blocks of pages free unless there is no other
choice. How many blocks of MIGRATE_RESERVE there are depends on the value
of min_free_kbytes (which can be tuned to a recommended value with hugeadm)
MIGRATE_RESERVE is known to be important for short-lived high-order allocations
- particularly atomic ones.

> Is there any problem in that case?
> (apart from the point that it is not tested for that purpose)
> 

It's racy, you are depending on compaction to happen at the right time
and with enough vigour to prevent allocation failures.

> Also how about using compaction as a preparation
> for partial refresh?
> 

Hacky, but you could do it from userspace by periodically writing to
/proc/sys/vm/compact_memory. In the event allocation failures are
common, it would still be best to figure out how long-lived those
allocations are and why MIGRATE_RESERVE was insufficient.

I'm not saying pre-emptively compacting won't work, it probably will for
a large number of cases but there will be failure scenarios in the
field.

-- 
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:[~2010-07-30 16:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-30 16:44 compaction: why depends on HUGETLB_PAGE Round Robinjp
2010-07-30 16:49 ` Mel Gorman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-07-29  1:53 Iram Shahzad
2010-07-29 12:57 ` Mel Gorman
2010-07-30  2:56   ` Iram Shahzad
2010-07-30  9:57     ` Mel Gorman

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=20100730164957.GH3571@csn.ul.ie \
    --to=mel@csn.ul.ie \
    --cc=iram.shahzad@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=roundrobinjp@yahoo.co.jp \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.