[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171017105921.4w7rba2day3k4g4p@dhcp22.suse.cz>
Date: Tue, 17 Oct 2017 12:59:21 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Guy Shattah <sguy@...lanox.com>
Cc: Christopher Lameter <cl@...ux.com>,
Mike Kravetz <mike.kravetz@...cle.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Michal Nazarewicz <mina86@...a86.com>,
"Aneesh Kumar K . V" <aneesh.kumar@...ux.vnet.ibm.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Anshuman Khandual <khandual@...ux.vnet.ibm.com>,
Laura Abbott <labbott@...hat.com>,
Vlastimil Babka <vbabka@...e.cz>
Subject: Re: [RFC PATCH 3/3] mm/map_contig: Add mmap(MAP_CONTIG) support
On Tue 17-10-17 10:50:02, Guy Shattah wrote:
[...]
> > Well, we can provide a generic library functions for your driver to use so that
> > you do not have to care about implementation details but I do not think
> > exposing this API to the userspace in a generic fashion is a good idea.
> > Especially when the only usecase that has been thought through so far seems
> > to be a very special HW optimiztion.
>
> Are you going to be OK with kernel API which implements contiguous
> memory allocation?
We already do have alloc_contig_range. It is a dumb allocator so it is
not very suitable for short term allocations.
> Possibly with mmap style? Many drivers could utilize it instead of
> having their own weird and possibly non-standard way to allocate
> contiguous memory. Such API won't be available for user space.
Yes, an mmap helper which performs and enforces some accounting would be a
good start.
> We can begin with implementing kernel API and postpone the userspace
> api discussion for a future date. if it is sufficient. We might not
> have to discuss it at all.
Yeah, that was my thinking as well.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists