All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Yang Shi <yang.shi@linux.alibaba.com>,
	willy@infradead.org, ldufour@linux.vnet.ibm.com,
	akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC v4 0/3] mm: zap pages with read mmap_sem in munmap for large mapping
Date: Wed, 11 Jul 2018 13:53:32 +0200	[thread overview]
Message-ID: <20180711115332.GM20050@dhcp22.suse.cz> (raw)
In-Reply-To: <20180711111311.hrh5kxdottmpdpn2@kshutemo-mobl1>

On Wed 11-07-18 14:13:12, Kirill A. Shutemov wrote:
> On Wed, Jul 11, 2018 at 12:33:12PM +0200, Michal Hocko wrote:
> > this is not a small change for something that could be achieved
> > from the userspace trivially (just call madvise before munmap - library
> > can hide this). Most workloads will even not care about races because
> > they simply do not play tricks with mmaps and userspace MM. So why do we
> > want to put the additional complexity into the kernel?
> 
> As I said before, kernel latency issues have to be addressed in kernel.
> We cannot rely on userspace being kind here.

Those who really care and create really large mappings will know how to
do this properly. Most others just do not care enough. So I am not
really sure this alone is a sufficient argument.

I personally like the in kernel auto tuning but as I've said the
changelog should be really clear why all the complications are
justified. This would be a lot easier to argue about if it was a simple
	if (len > THARSHOLD)
		do_madvise(DONTNEED)
	munmap().
approach. But if we really have to care about parallel faults and munmap
consitency this will always be tricky
-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2018-07-11 11:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-10 23:34 [RFC v4 0/3] mm: zap pages with read mmap_sem in munmap for large mapping Yang Shi
2018-07-10 23:34 ` Yang Shi
2018-07-10 23:34 ` [RFC v4 PATCH 1/3] mm: introduce VM_DEAD flag and extend check_stable_address_space to check it Yang Shi
2018-07-10 23:34 ` [RFC v4 PATCH 2/3] mm: refactor do_munmap() to extract the common part Yang Shi
2018-07-10 23:34 ` [RFC v4 PATCH 3/3] mm: mmap: zap pages with read mmap_sem for large mapping Yang Shi
2018-07-11 10:33 ` [RFC v4 0/3] mm: zap pages with read mmap_sem in munmap " Michal Hocko
2018-07-11 10:33   ` Michal Hocko
2018-07-11 11:13   ` Kirill A. Shutemov
2018-07-11 11:53     ` Michal Hocko [this message]
2018-07-11 17:08       ` Yang Shi
2018-07-11 16:57   ` Yang Shi
2018-07-11 16:57     ` Yang Shi
2018-07-11 22:49   ` Andrew Morton
2018-07-11 22:49     ` Andrew Morton
2018-07-12  8:15     ` Michal Hocko
2018-07-12  8:15       ` Michal Hocko
2018-07-11 11:10 ` Kirill A. Shutemov
2018-07-11 11:10   ` Kirill A. Shutemov
2018-07-11 11:58   ` Michal Hocko
2018-07-11 17:04   ` Yang Shi
2018-07-11 17:04     ` Yang Shi
2018-07-12  8:04     ` Michal Hocko
2018-07-12 23:45       ` Yang Shi
2018-07-12 23:45         ` Yang Shi

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=20180711115332.GM20050@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=kirill@shutemov.name \
    --cc=ldufour@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.org \
    --cc=yang.shi@linux.alibaba.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 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.