Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1578622

Re: [PATCH 4/4] mm,hugetlb: compute page_size_log properly

From Davidlohr Bueso <dave@stgolabs.net>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] mm,hugetlb: compute page_size_log properly
Date 2017-02-10 18:00 +0100
Message-ID <t9mIa-5ZB-27@gated-at.bofh.it> (permalink)
References <t93YS-2u7-13@gated-at.bofh.it> <t93YS-2u7-11@gated-at.bofh.it> <t9gCK-2aq-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 10 Feb 2017, Michal Hocko wrote:

>On Thu 09-02-17 12:53:02, Davidlohr Bueso wrote:
>> The SHM_HUGE_* stuff  was introduced in:
>>
>>    42d7395feb5 (mm: support more pagesizes for MAP_HUGETLB/SHM_HUGETLB)
>>
>> It unnecessarily adds another layer, specific to sysv shm, without
>> anything special about it: the macros are identical to the MAP_HUGE_*
>> stuff, which in turn does correctly describe the hugepage subsystem.
>>
>> One example of the problems with extra layers what this patch fixes:
>> mmap_pgoff() should never be using SHM_HUGE_* logic. It is obviously
>> harmless but it would still be grand to get rid of it -- although
>> now in the manpages I don't see that happening.
>
>Can we just drop SHM_HUGE_MASK altogether? It is not exported in uapi
>headers AFAICS.

Yeah that was my original idea, however I noticed that shmget.2 mentions
kernel internals as part of SHM_HUGE_{2MB,1GB}, ie: SHM_HUGE_SHIFT. So
dropping _MASK doesn't make sense if we are going to keep _SHIFT.

Thanks,
Davidlohr

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 4/4] mm,hugetlb: compute page_size_log properly Davidlohr Bueso <dave@stgolabs.net> - 2017-02-09 22:00 +0100
  Re: [PATCH 4/4] mm,hugetlb: compute page_size_log properly Michal Hocko <mhocko@kernel.org> - 2017-02-10 11:30 +0100
    Re: [PATCH 4/4] mm,hugetlb: compute page_size_log properly Davidlohr Bueso <dave@stgolabs.net> - 2017-02-10 18:00 +0100

csiph-web