linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: "Nitin Gupta" <nitin.m.gupta@oracle.com>,
	"Nitin Gupta" <nitingupta910@gmail.com>,
	steven.sistare@oracle.com,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Ingo Molnar" <mingo@kernel.org>, "Mel Gorman" <mgorman@suse.de>,
	"Nadav Amit" <namit@vmware.com>,
	"Minchan Kim" <minchan@kernel.org>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Vegard Nossum" <vegard.nossum@oracle.com>,
	"Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>,
	"Mike Rapoport" <rppt@linux.vnet.ibm.com>,
	"Hillf Danton" <hillf.zj@alibaba-inc.com>,
	"Shaohua Li" <shli@fb.com>,
	"Anshuman Khandual" <khandual@linux.vnet.ibm.com>,
	"David Rientjes" <rientjes@google.com>,
	"Rik van Riel" <riel@redhat.com>, "Jan Kara" <jack@suse.cz>,
	"Dave Jiang" <dave.jiang@intel.com>,
	"Jérôme Glisse" <jglisse@redhat.com>,
	"Matthew Wilcox" <willy@linux.intel.com>,
	"Ross Zwisler" <ross.zwisler@linux.intel.com>,
	"Hugh Dickins" <hughd@google.com>,
	"Tobin C Harding" <me@tobin.cc>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v2] mm: Reduce memory bloat with THP
Date: Thu, 25 Jan 2018 23:40:29 +0100	[thread overview]
Message-ID: <20180125224029.GB4454@redhat.com> (raw)
In-Reply-To: <20180125095832.GN28465@dhcp22.suse.cz>

On Thu, Jan 25, 2018 at 10:58:32AM +0100, Michal Hocko wrote:
> Ohh, absolutely. And that is why we have changed the default in upstream
> 444eb2a449ef ("mm: thp: set THP defrag by default to madvise and add a
> stall-free defrag option")

Agreed, that direct compaction change should already address the cases
quoted in the other URLs.

One of the URL is about using fork() to snapshot a nosql db state,
that one can't be helped by the above commit but it's still unrelated
to MADV_DONTNEED or memory bloat.

It would be possible to fully fix the use of fork() for snapshotting
without userfaultfd WP mode, by just adding an madvise that forces 4k
CoWs on top of 2M THP and to call it in the parent that keeps writing
to memory while the child is writing the readonly copy to disk, but I
believe userfaultfd WP will be way more optimal as it provides so many
other advantages (i.e. avoid fork() in the first place and use
pthread_create and be able to throttle on I/O and limit the max memory
usage to something less than x2 RAM without the risk of triggering the
OOM killer and have a ring that is written immediately to keep the mem
utilization low etc..).

Thanks,
Andrea

--
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:[~2018-01-25 22:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 23:33 [PATCH v2] mm: Reduce memory bloat with THP Nitin Gupta
2018-01-19 12:49 ` Michal Hocko
2018-01-19 20:59   ` Nitin Gupta
2018-01-25  0:47     ` Zi Yan
2018-01-25 19:41       ` Nitin Gupta
2018-01-25 21:13         ` Mel Gorman
2018-02-01  1:09           ` Nitin Gupta
2018-02-01 10:09             ` Mel Gorman
2018-02-01 10:27           ` Kirill A. Shutemov
2018-02-01 10:46             ` Mel Gorman
2018-01-25 22:29         ` Andrea Arcangeli
2018-01-25  9:58     ` Michal Hocko
2018-01-25 22:40       ` Andrea Arcangeli [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=20180125224029.GB4454@redhat.com \
    --to=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.levin@verizon.com \
    --cc=dave.jiang@intel.com \
    --cc=hillf.zj@alibaba-inc.com \
    --cc=hughd@google.com \
    --cc=jack@suse.cz \
    --cc=jglisse@redhat.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=me@tobin.cc \
    --cc=mgorman@suse.de \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    --cc=mingo@kernel.org \
    --cc=namit@vmware.com \
    --cc=nitin.m.gupta@oracle.com \
    --cc=nitingupta910@gmail.com \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=rientjes@google.com \
    --cc=ross.zwisler@linux.intel.com \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=shli@fb.com \
    --cc=steven.sistare@oracle.com \
    --cc=vegard.nossum@oracle.com \
    --cc=willy@linux.intel.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).