linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Bob Liu <lliubbo@gmail.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
	linux-mm@kvack.org, akpm@linux-foundation.org,
	hannes@cmpxchg.org
Subject: Re: [RFC PATCH] mm: thp: make swap configurable
Date: Tue, 11 Oct 2011 09:40:32 -0400	[thread overview]
Message-ID: <4E944750.8080604@redhat.com> (raw)
In-Reply-To: <CAA_GA1cC=6e6+bFp7on+BtmBp4qgfiyjSzvJQ23F41LobnzNfA@mail.gmail.com>

On 10/11/2011 05:24 AM, Bob Liu wrote:

> Yes, mlock() can do it but it will require a lot of changes in every
> user application.
> If some of the applications are hugh and complicated(even not opensource), it's
> hard to modify them.
> Add this patch can make things simple and thp more flexible.
>
> For using swapoff -a, it will disable swap for 4k normal pages.
>
> A simple use case is like this:
> a lot of swap sensitive apps run on a machine, it will use thp so we
> need to disable swap.
> But  this apps are hugh and complicated, it's hard to modify them by mlock().
>
> In addition, there are also some normal and not swap sensitive apps
> which don't use thp run on
> the same machine, we can still reclaim their memory by swap when lack
> of memory.

The normal applications could end up getting transparent
huge pages automatically, which would also disable swap
for them.

At that point, you could run out of memory, because you
disabled swap for 2MB pages.

How do you plan to avoid that?

-- 
All rights reversed

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-10-11 13:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-10 13:58 [RFC PATCH] mm: thp: make swap configurable Bob Liu
2011-10-10 14:18 ` Andrea Arcangeli
2011-10-11  9:24   ` Bob Liu
2011-10-11 13:40     ` Rik van Riel [this message]
2011-10-11 21:01     ` Andrea Arcangeli
2011-10-12  9:59 ` Johannes Weiner

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=4E944750.8080604@redhat.com \
    --to=riel@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=lliubbo@gmail.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).