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


Groups > linux.kernel > #1584710 > unrolled thread

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

Started byMichal Hocko <mhocko@kernel.org>
First post2017-02-20 17:20 +0100
Last post2017-02-22 17:30 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

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

FromMichal Hocko <mhocko@kernel.org>
Date2017-02-20 17:20 +0100
SubjectRe: [PATCH 4/4] mm,hugetlb: compute page_size_log properly
Message-ID<tcYQW-6Uz-21@gated-at.bofh.it>
Sorry for a late reply, I wasn't online last week

On Fri 10-02-17 08:51:11, Davidlohr Bueso wrote:
> 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.

I am not sure I understand.
$ git grep SHM_HUGE_ include/uapi/
$

So there doesn't seem to be any user visible constant. The man page
mentiones is but I do not really see how is the userspace supposed to
use it.
-- 
Michal Hocko
SUSE Labs

[toc] | [next] | [standalone]


#1586286

FromDavidlohr Bueso <dave@stgolabs.net>
Date2017-02-22 17:10 +0100
Message-ID<tdHEl-4jF-15@gated-at.bofh.it>
In reply to#1584710
On Mon, 20 Feb 2017, Michal Hocko wrote:

>I am not sure I understand.
>$ git grep SHM_HUGE_ include/uapi/
>$
>
>So there doesn't seem to be any user visible constant. The man page
>mentiones is but I do not really see how is the userspace supposed to
>use it.

Yeah, userspace is not supposed to use it, it's just there because
the manpage describes kernel internals. I'm not really a big fan
of touching manpages (and ipc is already full of corner cases),
but I guess nobody can really complain if we rip out all the
SHM_HUGE_ stuff.

Thanks,
Davidlohr

[toc] | [prev] | [next] | [standalone]


#1586293

FromMichal Hocko <mhocko@kernel.org>
Date2017-02-22 17:30 +0100
Message-ID<tdHXH-4rY-3@gated-at.bofh.it>
In reply to#1586286
On Wed 22-02-17 08:03:19, Davidlohr Bueso wrote:
> On Mon, 20 Feb 2017, Michal Hocko wrote:
> 
> > I am not sure I understand.
> > $ git grep SHM_HUGE_ include/uapi/
> > $
> > 
> > So there doesn't seem to be any user visible constant. The man page
> > mentiones is but I do not really see how is the userspace supposed to
> > use it.
> 
> Yeah, userspace is not supposed to use it, it's just there because
> the manpage describes kernel internals.

Which is wrong!

> I'm not really a big fan
> of touching manpages (and ipc is already full of corner cases),
> but I guess nobody can really complain if we rip out all the
> SHM_HUGE_ stuff.

yeah, let's just get rid of it.
-- 
Michal Hocko
SUSE Labs

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web