[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <xa1t60bfxtzw.fsf@mina86.com>
Date: Mon, 16 Oct 2017 12:33:07 +0200
From: Michal Nazarewicz <mina86@...a86.com>
To: Guy Shattah <sguy@...lanox.com>, Michal Hocko <mhocko@...nel.org>,
Christopher Lameter <cl@...ux.com>
Cc: Mike Kravetz <mike.kravetz@...cle.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
Marek Szyprowski <m.szyprowski@...sung.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 Sun, Oct 15 2017, Guy Shattah wrote:
> Why have several driver specific implementation if you can generalize
> the idea and implement an already existing POSIX standard?
Why is there a need for contiguous allocation?
CPU cares only to the point of huge pages and there’s already an effort
in the kernel to allocate huge pages transparently without user space
being aware of it.
If not CPU than various devices all of which may have very different
needs. Some may be behind an IO MMU. Some may support DMA. Some may
indeed require physically continuous memory. How is user space to know?
Furthermore, user space does not care whether allocation is physically
contiguous or not. What it cares about is whether given allocation can
be passed as a buffer to a particular device.
If generalisation is the issue, then the solution is to define a common
API where user-space can allocate memory *in the context of* a device.
This provides a ‘give me memory I can use for this device’ request which
is what user space really wants.
So yeah, like others in this thread, the reason for this change alludes
me. On the other hand, I don’t care much so I’ll limit myself to this
one message.
--
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»
Powered by blists - more mailing lists