linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, oleg@redhat.com,
	peterz@infradead.org, mm-commits@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: + include-linux-sched-mmh-uninline-mmdrop_async-etc.patch added to -mm tree
Date: Mon, 18 Sep 2017 08:08:00 +0200	[thread overview]
Message-ID: <20170918060800.mh6abseaj7ndtlso@dhcp22.suse.cz> (raw)
In-Reply-To: <20170915110520.69c2b26b32f03f0c34e2d2a1@linux-foundation.org>

On Fri 15-09-17 11:05:20, Andrew Morton wrote:
> On Fri, 15 Sep 2017 09:12:28 +0200 Michal Hocko <mhocko@kernel.org> wrote:
> 
> > On Fri 15-09-17 09:07:31, Michal Hocko wrote:
> > > On Thu 14-09-17 13:19:38, Andrew Morton wrote:
> > > > From: Andrew Morton <akpm@linux-foundation.org>
> > > > Subject: include/linux/sched/mm.h: uninline mmdrop_async(), etc
> > > > 
> > > > mmdrop_async() is only used in fork.c.  Move that and its support
> > > > functions into fork.c, uninline it all.
> > > 
> > > Is this really an improvement? Why do we want to discourage more code
> > > paths to use mmdrop_async? It sounds like a useful api and it has been
> > > removed only because it lost its own user in oom code. Now that we have
> > > a user I would just keep it where it was before.
> > 
> > Dohh, I have mixed mmput_async with mmdrop_async. Anyway I still think
> > that this is universal enough to have it in a header rather than hiding
> > it in fork.c
> 
> Async free is a hack.  It consumes more resources (runtime and memory)
> than a synchronous free.  It introduces a risk of memory exhaustion
> when an unbounded number of async frees are pending, not yet serviced. 
> It introduces a risk of unbounded latency when an unbounded number of
> async frees are serviced by the kernel thread.

It is our standard technique of postponing an action to a more relaxed
context when we cannot afford an action from the current context.
 
> Synchronous frees are simply better, so we shouldn't encourage the use
> of async frees.

No questions about that. But we have a clear demand for the deferred
implementation as well. And we have learned that having our own
private, thing usually leads people to invent their own wheel.

-- 
Michal Hocko
SUSE Labs

--
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:[~2017-09-18  6:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <59bae45a.Fmr8uSXzjRP94/2V%akpm@linux-foundation.org>
2017-09-15  7:07 ` Michal Hocko
2017-09-15  7:12   ` Michal Hocko
2017-09-15 18:05     ` Andrew Morton
2017-09-18  6:08       ` Michal Hocko [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=20170918060800.mh6abseaj7ndtlso@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    /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