From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757653AbdJPVTU (ORCPT ); Mon, 16 Oct 2017 17:19:20 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:44348 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757635AbdJPVTS (ORCPT ); Mon, 16 Oct 2017 17:19:18 -0400 Subject: Re: [RFC PATCH 3/3] mm/map_contig: Add mmap(MAP_CONTIG) support To: Laura Abbott , Michal Hocko Cc: Guy Shattah , Christopher Lameter , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Marek Szyprowski , Michal Nazarewicz , "Aneesh Kumar K . V" , Joonsoo Kim , Anshuman Khandual , Vlastimil Babka References: <20171013084054.me3kxhgbxzgm2lpr@dhcp22.suse.cz> <20171013152801.nbpk6nluotgbmfrs@dhcp22.suse.cz> <20171013154747.2jv7rtfqyyagiodn@dhcp22.suse.cz> <20171013161736.htumyr4cskfrjq64@dhcp22.suse.cz> <752b49eb-55c6-5a34-ab41-6e91dd93ea70@mellanox.com> <20171016180749.2y2v4ucchb33xnde@dhcp22.suse.cz> <4994fc18-f0ee-300d-d61f-c1a1b63e55e4@redhat.com> From: Mike Kravetz Message-ID: Date: Mon, 16 Oct 2017 14:18:49 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <4994fc18-f0ee-300d-d61f-c1a1b63e55e4@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/16/2017 02:03 PM, Laura Abbott wrote: > On 10/16/2017 01:32 PM, Mike Kravetz wrote: >> On 10/16/2017 11:07 AM, Michal Hocko wrote: >>> On Mon 16-10-17 10:43:38, Mike Kravetz wrote: >>>> Just to be clear, the posix standard talks about a typed memory object. >>>> The suggested implementation has one create a connection to the memory >>>> object to receive a fd, then use mmap as usual to get a mapping backed >>>> by contiguous pages/memory. Of course, this type of implementation is >>>> not a requirement. >>> >>> I am not sure that POSIC standard for typed memory is easily >>> implementable in Linux. Does any OS actually implement this API? >> >> A quick search only reveals Blackberry QNX and PlayBook OS. >> >> Also somewhat related. In a earlier thread someone pointed out this >> out of tree module used for contiguous allocations in SOC (and other?) >> environments. It even has the option of making use of CMA. >> http://processors.wiki.ti.com/index.php/CMEM_Overview >> > > If we're at the point where we're discussing CMEM, I'd like to > point out that ion (drivers/staging/android/ion) already provides an > ioctl interface to allocate CMA and other types of memory. It's > mostly used for Android as the name implies. I don't pretend the > interface is perfect but it could be useful as a discussion point > for allocation interfaces. Thanks Laura, I was just pointing out other use cases where people thought contiguous allocations were useful. And, it was useful enough that someone actually wrote code to make it happen. -- Mike Kravetz