From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 527A9C433EF for ; Sat, 8 Jan 2022 13:37:44 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1n6BuP-0004aw-P0; Sat, 08 Jan 2022 08:37:25 -0500 Received: from mail-yb1-xb2e.google.com ([2607:f8b0:4864:20::b2e]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1n6BuN-0004aZ-AV for kernelnewbies@kernelnewbies.org; Sat, 08 Jan 2022 08:37:23 -0500 Received: by mail-yb1-xb2e.google.com with SMTP id c6so22888752ybk.3 for ; Sat, 08 Jan 2022 05:37:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+y7wDOzKdzrc3rxBC3sKiCoo08sO6KVZ0n3xHy9xSJ4=; b=Nj3EWWrztVnzSL1YaO5K3vYtPuSicvQUVZGTk5kzw83hsPEwD4l9WAqZVv+zVL/cKW QI0eVwohhUgToTHfv2pwCRLm4P1QsmW2DKwcOp+W/W+4pUftpDnmem0qE9ucRUwQv4hh fd/LTyzADxWiCVC2lM7Sa780CggsCRd4xa5B6Yh2eyRD/4zwIe/AK8Qy7a8bkBAQw1wt OEKMubnhzYM0Ppjnkja1JHqQPEYKHDfbFwksF6NvKHRC1oV6mkyWVEK6jHEryz7Z06yu dBBdK1lUrlA7k6FNYF+ZrlgtAb9Dg6veCJy7DVYyv9aXSlLt/UtHP8YI4OWkNGyOAhGS qbPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+y7wDOzKdzrc3rxBC3sKiCoo08sO6KVZ0n3xHy9xSJ4=; b=Q7EPfD4On1Y8zmpwBkVn81pRc4LtexaV4k7U17p75HnR4M7E01kKC96jg1NeB/1Drh U6IdDt8J/DbwCwk8rmxKLmgbjGUPG3f8tv7l1BrJUcfydBSvPTDaQK0X+B1wvAMTfYug zTpChTP/1CpSZngpwknghLxhiIJ6qjXP5DWJbmISA+NRD9SiTs1huaSHX7q3YId8SBWV Q0OOVV9kbrq3Oak7eSDegpCEzodbf6Vk0Pm/IqUm7b1YovjzQPnJXSAS3v/zz8Sx4/z9 Tp1ow/FJDgNB9tFDLWVuMVzPi3XTFNUhzL+2ffnIcDAvbYz9Cgt8ivmUZlca1iwf9Ljz gsdg== X-Gm-Message-State: AOAM532i4Z8A7FVjBFmia/NqUKk4p7Lv5LCKHabs1NR+F25M8nfmCr7m krkI2zd5ZphA6ikjSdYZ9LTY6Gw2A5DUS/uxY1Y= X-Google-Smtp-Source: ABdhPJxEk9iW7zRSKLJ0qEca7OBk/J0n/s1A64sYQ3p2fu7z7k3aqRDIzzGK2OMweMcZ74dcG7tmiTR06zR2pAqLtSI= X-Received: by 2002:a25:cc4a:: with SMTP id l71mr76041865ybf.350.1641649041196; Sat, 08 Jan 2022 05:37:21 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Sadanand Warrier Date: Sat, 8 Jan 2022 08:37:10 -0500 Message-ID: Subject: Re: Contiguous Memory Allocator (CMA) To: FMDF Cc: kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org Hello Fabio Thanks for the response. I had already accessed that link that you have pasted. Michal Nazarewicz also has a few other points on using CMA. When I tried to use the API after setting cma=128M on the kernel boot command line and booted the kernel, the api returned without allocating memory when the driver was installed. The dmesg shows that 128M was reserved for CMA but dma_alloc_coherent failed. It seems that default CentOS and perhaps Ubuntu kernels are not compiled with CONFIG_DMA_CMA=yes for the dma_alloc_coherent to work. I'm not sure if this is a valid assumption. I haven't tried recompiling the kernel yet with that option set. >From what I have managed to eke out we need CONFIG_CMA=yes and CONFIG_DMA_CMA=yes too. Thanks S On Sat, 8 Jan 2022 at 07:23, FMDF wrote: > > On Tue, 21 Dec 2021, 15:36 Sadanand Warrier, wrote: >> >> Hello >> Is CMA still supported as described in this document >> https://lwn.net/Articles/396707/ ? > > > Yes, it is. > > Read the following instructions on how to use that feature: > > "A deep dive into CMA" at > https://lwn.net/Articles/486301/ > > Regards, > > Fabio M. De Francesco > _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies