Re: [patch 1/2] mm, doc: cleanup and clarify munmap behavior for hugetlb memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]