public inbox for linux-api@vger.kernel.org
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
To: Eric B Munson <emunson-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org>
Cc: Hugh Dickins <hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	David Rientjes <rientjes-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Jonathan Corbet <corbet-T1hC0tSOHrs@public.gmane.org>,
	Davide Libenzi <davidel-AhlLAIvw+VEjIGhXcJzhZg@public.gmane.org>,
	Luiz Capitulino
	<lcapitulino-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>,
	Andrea Arcangeli
	<aarcange-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Joern Engel <joern-PCqxUs/MD9bYtjvyW6yDsg@public.gmane.org>,
	Jianguo Wu <wujianguo-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [patch 1/2] mm, doc: cleanup and clarify munmap behavior for hugetlb memory
Date: Mon, 30 Mar 2015 13:23:20 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LSU.2.11.1503301307490.2485@eggly.anvils> (raw)
In-Reply-To: <20150330142336.GB17678-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org>

On Mon, 30 Mar 2015, Eric B Munson wrote:
> On Sun, 29 Mar 2015, Hugh Dickins wrote:
> > 
> > Eric, I apologize for bringing you in to the discussion, and then
> > ignoring your input.  I understand that you would like MAP_HUGETLB
> > to behave more understandably.  We can all agree that the existing
> > behavior is unsatisfying.  But it's many years too late now to 
> > change it around - and I suspect that a full exercise to do so would
> > actually discover some good reasons why the original choices were made.
> 
> No worries, my main concern was avoiding the confusion that led me down
> the rabbit hole of compaction and mlock.  As long as the documentation,
> man pages, and the code all agree I am satisfied.  I would have
> preferred to make the code match the docs, but I understand that
> changing the code now introduces a risk of breaking userspace.
> 
> It is charitable of you to assume that there were good reasons for the
> original decision.  But as the author of the code in question, I suspect
> the omission was one of my own inexperience.

No, you are both too modest and too arrogant :)

You were extending the existing hugetlbfs infrastructure to be
accessible through a MAP_HUGETLB interface.  You therefore inherited
the defects (some probably necessary, others perhaps not) of the
original hugetlbfs implementation, which is where this disagreeable
behaviour comes from.

If you were to ask for MAP_HUGETLB to behave differently from mapping
hugetlbfs here, I would shout no.  For a start, we'd have to add a
VM_HUGETLB2 flag so that each place that tests VM_HUGETLB (usually
through is_vm_hugetlb_page(vma) - sic) could decide how to behave
instead.

I for one have neither time nor inclination to write or review
any such patch.

Hugh

  parent reply	other threads:[~2015-03-30 20:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26 23:23 [patch 1/2] mm, doc: cleanup and clarify munmap behavior for hugetlb memory David Rientjes
2015-03-26 23:23 ` [patch 2/2] mm, selftests: test return value of munmap for MAP_HUGETLB memory David Rientjes
     [not found]   ` <alpine.DEB.2.10.1503261623280.20009-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2015-03-26 23:52     ` Michael Ellerman
     [not found] ` <alpine.DEB.2.10.1503261621570.20009-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2015-03-27 13:58   ` [patch 1/2] mm, doc: cleanup and clarify munmap behavior for hugetlb memory Eric B Munson
2015-03-28  1:37     ` David Rientjes
2015-03-30  1:35   ` Hugh Dickins
     [not found]     ` <alpine.LSU.2.11.1503291801400.1052-fupSdm12i1nKWymIFiNcPA@public.gmane.org>
2015-03-30 14:23       ` Eric B Munson
     [not found]         ` <20150330142336.GB17678-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org>
2015-03-30 20:23           ` Hugh Dickins [this message]
2015-04-02 22:40     ` David Rientjes
2015-04-02 22:50       ` [patch -mm] mm, doc: cleanup and clarify munmap behavior for hugetlb memory fix David Rientjes
2015-04-03  1:05         ` Hugh Dickins
2015-04-04  9:34         ` Jonathan Corbet
     [not found]           ` <20150404113456.55468dc3-T1hC0tSOHrs@public.gmane.org>
2015-04-09 19:46             ` David Rientjes
2015-04-11 13:26               ` Jonathan Corbet

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=alpine.LSU.2.11.1503301307490.2485@eggly.anvils \
    --to=hughd-hpiqsd4aklfqt0dzr+alfa@public.gmane.org \
    --cc=aarcange-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=corbet-T1hC0tSOHrs@public.gmane.org \
    --cc=davidel-AhlLAIvw+VEjIGhXcJzhZg@public.gmane.org \
    --cc=emunson-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org \
    --cc=joern-PCqxUs/MD9bYtjvyW6yDsg@public.gmane.org \
    --cc=lcapitulino-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=rientjes-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org \
    --cc=wujianguo-hv44wF8Li93QT0dZR+AlfA@public.gmane.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