[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.11.1503301307490.2485@eggly.anvils>
Date: Mon, 30 Mar 2015 13:23:20 -0700 (PDT)
From: Hugh Dickins <hughd@...gle.com>
To: Eric B Munson <emunson@...mai.com>
cc: Hugh Dickins <hughd@...gle.com>,
David Rientjes <rientjes@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Jonathan Corbet <corbet@....net>,
Davide Libenzi <davidel@...ilserver.org>,
Luiz Capitulino <lcapitulino@...hat.com>,
Shuah Khan <shuahkh@....samsung.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Joern Engel <joern@...fs.org>,
Jianguo Wu <wujianguo@...wei.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [patch 1/2] mm, doc: cleanup and clarify munmap behavior for
hugetlb memory
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists