> For what type of device? NTB (Non-Transparent Bridge). -----Original Message----- From: gregkh@xxxxxxxxxxxxxxxxxxx <gregkh@xxxxxxxxxxxxxxxxxxx> Sent: יום ד 13 מאי 2020 09:48 To: Idgar, Or Cc: linux-kernel@xxxxxxxxxxxxxxx; linux-mm@xxxxxxxxx; Ravich, Leonid Subject: Re: CMA enhancement - non-default areas in x86 [EXTERNAL EMAIL] On Wed, May 13, 2020 at 06:13:55AM +0000, Idgar, Or wrote: > Hi, > I'm working with Linux kernel on x86 and needed a way to allocate a very large contiguous memory (around 20GB) for DMA operations. For what type of device? > I've found out that CMA is one of the major ways to do so, but our problem is that CMA's default behavior is to create one default area from which all devices can allocate memory. > when booting, there were some drivers that allocated memory for DMA and used CMA memory if exist. The problem is that it takes memory that we need for our device and we want to make sure this area is dedicated for our device. > > As I saw, the only way to reserve a dedicated area is by enabling OF_RESERVED_MEM which is available for several architectures but excluding x86 (and as far as I understand relies on device tree which is not in use with x86 or at least cannot be configured with OF_RESERVED_MEM). > > I really want to leverage this mechanism/API and thought about modifying the code (and hopefully merge it upstream) so multiple non-default areas will be available for x86 and with a way to consume it by mapping specific area to specific device. > > Is it something that will be open for merging if written properly? We always will be glad to review patches, no need to ask us about that. Just post them! good luck, greg k-h