linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Aaron Lu <aaron.lu@intel.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Dave Hansen <dave.hansen@intel.com>,
	Tim Chen <tim.c.chen@intel.com>,
	Ying Huang <ying.huang@intel.com>
Subject: Re: [PATCH 0/5] mm: support parallel free of memory
Date: Tue, 28 Feb 2017 16:39:47 -0800	[thread overview]
Message-ID: <20170228163947.cbd83e48dcb149c697b316cd@linux-foundation.org> (raw)
In-Reply-To: <20170224114036.15621-1-aaron.lu@intel.com>

On Fri, 24 Feb 2017 19:40:31 +0800 Aaron Lu <aaron.lu@intel.com> wrote:

> For regular processes, the time taken in its exit() path to free its
> used memory is not a problem. But there are heavy ones that consume
> several Terabytes memory and the time taken to free its memory could
> last more than ten minutes.
> 
> To optimize this use case, a parallel free method is proposed here.
> For detailed explanation, please refer to patch 2/5.
> 
> I'm not sure if we need patch 4/5 which can avoid page accumulation
> being interrupted in some case(patch description has more information).
> My test case, which only deal with anon memory doesn't get any help out
> of this of course. It can be safely dropped if it is deemed not useful.
> 
> A test program that did a single malloc() of 320G memory is used to see
> how useful the proposed parallel free solution is, the time calculated
> is for the free() call. Test machine is a Haswell EX which has
> 4nodes/72cores/144threads with 512G memory. All tests are done with THP
> disabled.
> 
> kernel                             time
> v4.10                              10.8s  __2.8%
> this patch(with default setting)   5.795s __5.8%

Dumb question: why not do this in userspace, presumably as part of the
malloc() library?  malloc knows where all the memory is and should be
able to kick off N threads to run around munmapping everything?

--
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:[~2017-03-01  0:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-24 11:40 [PATCH 0/5] mm: support parallel free of memory Aaron Lu
2017-02-24 11:40 ` [PATCH 1/5] mm: add tlb_flush_mmu_free_batches Aaron Lu
2017-02-24 11:40 ` [PATCH 2/5] mm: parallel free pages Aaron Lu
2017-02-24 11:40 ` [PATCH 3/5] mm: use a dedicated workqueue for the free workers Aaron Lu
2017-02-24 11:40 ` [PATCH 4/5] mm: add force_free_pages in zap_pte_range Aaron Lu
2017-02-24 11:40 ` [PATCH 5/5] mm: add debugfs interface for parallel free tuning Aaron Lu
2017-03-01  0:39 ` Andrew Morton [this message]
2017-03-01  0:43   ` [PATCH 0/5] mm: support parallel free of memory Dave Hansen
2017-03-01  1:17     ` Aaron Lu

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=20170228163947.cbd83e48dcb149c697b316cd@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=aaron.lu@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=tim.c.chen@intel.com \
    --cc=ying.huang@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).