[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190114135001.w2wpql53zitellus@kshutemo-mobl1>
Date: Mon, 14 Jan 2019 16:50:02 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Mike Kravetz <mike.kravetz@...cle.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Hugh Dickins <hughd@...gle.com>,
Michal Hocko <mhocko@...nel.org>,
Dan Williams <dan.j.williams@...el.com>,
Matthew Wilcox <willy@...radead.org>,
Toshi Kani <toshi.kani@....com>,
Boaz Harrosh <boazh@...app.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [RFC PATCH] mm: align anon mmap for THP
On Fri, Jan 11, 2019 at 03:28:37PM -0800, Mike Kravetz wrote:
> Ok, I just wanted to ask the question. I've seen application code doing
> the 'mmap sufficiently large area' then unmap to get desired alignment
> trick. Was wondering if there was something we could do to help.
Application may want to get aligned allocation for different reasons.
It should be okay for userspace to ask for size + (alignment - PAGE_SIZE)
and then round up the address to get the alignment. We basically do the
same on kernel side.
For THP, I believe, kernel already does The Right Thing™ for most users.
User still may want to get speific range as THP (to avoid false sharing or
something). But still I believe userspace has all required tools to get it
right.
--
Kirill A. Shutemov
Powered by blists - more mailing lists