lkml.org 
[lkml]   [2017]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] mmap(MAP_CONTIG)
On Thu, 5 Oct 2017, Vlastimil Babka wrote:

> On 10/04/2017 01:56 AM, Mike Kravetz wrote:
> > At Plumbers this year, Guy Shattah and Christoph Lameter gave a presentation
> > titled 'User space contiguous memory allocation for DMA' [1]. The slides
> Hm I didn't find slides on that link, are they available?

I just added Guy's slides to the entry.

> As Michal N. noted, the drivers might have different requirements. Is
> contiguity (without extra requirements) so common that it would benefit
> from a userspace API change?

Yes.

> Also how are the driver-specific allocations done today? mmap() on the
> driver's device? Maybe we could provide some in-kernel API/library to
> make them less "ad-hoc". Conversion to MAP_ANONYMOUS would at first seem
> like an improvement in that userspace would be able to use a generic
> allocation API and all the generic treatment of anonymous pages (LRU
> aging, reclaim, migration etc), but the restrictions you listed below
> eliminate most of that?
> (It's likely that I just don't have enough info about how it works today
> so it's difficult to judge)

Contemporary devices typically can address all of memory. Moreover the
device used actually can trigger faults to page in 4k pages if they are
not present (ODP in RDMA layer). There is no need for driver specific
allocation in those drivers.

\
 
 \ /
  Last update: 2017-10-05 16:31    [W:0.296 / U:0.564 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site