[lkml]   [2017]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH 3/3] mm/map_contig: Add mmap(MAP_CONTIG) support
On 10/17/2017 07:20 AM, Guy Shattah wrote:
>> On Tue, Oct 17 2017, Guy Shattah wrote:
>>> Are you going to be OK with kernel API which implements contiguous
>>> memory allocation? 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.
>> What you describe sounds like CMA. It may be far from perfect but it’s there
>> already and drivers which need contiguous memory can allocate it.
> 1. CMA has to preconfigured. We're suggesting mechanism that works 'out of the box'
> 2. Due to the pre-allocation techniques CMA imposes limitation on maximum
> allocated memory. RDMA users often require 1Gb or more, sometimes more.
> 3. CMA reserves memory in advance, our suggestion is using existing kernel memory
> mechanisms (THP for example) to allocate memory.

I would not totally rule out the use of CMA. I like the way that it reserves
memory, but does not prohibit use by others. In addition, there can be
device (or purpose) specific reservations.

However, since reservations need to happen quite early it is often done on
the kernel command line. IMO, this should be avoided if possible. There
are interfaces for arch specific code to make reservations. I do not know
the system initialization sequence well enough to know if it would be
possible for driver code to make CMA reservations. But, it looks doubtful.

Mike Kravetz

 \ /
  Last update: 2017-10-17 20:25    [W:0.065 / U:6.652 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site