All of lore.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Michal Hocko <mhocko@kernel.org>
Cc: akpm@linux-foundation.org, manfred@colorfullife.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH 4/4] mm,hugetlb: compute page_size_log properly
Date: Fri, 10 Feb 2017 08:51:11 -0800	[thread overview]
Message-ID: <20170210165111.GB2392@linux-80c1.suse> (raw)
In-Reply-To: <20170210102044.GA10054@dhcp22.suse.cz>

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

WARNING: multiple messages have this Message-ID (diff)
From: Davidlohr Bueso <dave@stgolabs.net>
To: Michal Hocko <mhocko@kernel.org>
Cc: akpm@linux-foundation.org, manfred@colorfullife.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH 4/4] mm,hugetlb: compute page_size_log properly
Date: Fri, 10 Feb 2017 08:51:11 -0800	[thread overview]
Message-ID: <20170210165111.GB2392@linux-80c1.suse> (raw)
In-Reply-To: <20170210102044.GA10054@dhcp22.suse.cz>

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

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

  reply	other threads:[~2017-02-10 16:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 20:52 [PATCH -tip 0/4] ipc/shm: moar updates for v4.11 Davidlohr Bueso
2017-02-09 20:52 ` [PATCH 1/4] ipc/shm: do not check for MAP_POPULATE Davidlohr Bueso
2017-02-10  2:15   ` Hugh Dickins
2017-02-13 18:14     ` Davidlohr Bueso
2017-02-09 20:53 ` [PATCH 2/4] ipc/shm: some shmat cleanups Davidlohr Bueso
2017-02-09 20:53 ` [PATCH 3/4] sysv,ipc: cacheline align kern_ipc_perm Davidlohr Bueso
2017-02-09 20:53 ` [PATCH 4/4] mm,hugetlb: compute page_size_log properly Davidlohr Bueso
2017-02-09 20:53   ` Davidlohr Bueso
2017-02-10 10:20   ` Michal Hocko
2017-02-10 10:20     ` Michal Hocko
2017-02-10 16:51     ` Davidlohr Bueso [this message]
2017-02-10 16:51       ` Davidlohr Bueso
2017-02-20 16:11       ` Michal Hocko
2017-02-20 16:11         ` Michal Hocko
2017-02-22 16:03         ` Davidlohr Bueso
2017-02-22 16:03           ` Davidlohr Bueso
2017-02-22 16:11           ` Michal Hocko
2017-02-22 16:11             ` Michal Hocko

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=20170210165111.GB2392@linux-80c1.suse \
    --to=dave@stgolabs.net \
    --cc=akpm@linux-foundation.org \
    --cc=dbueso@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=manfred@colorfullife.com \
    --cc=mhocko@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.