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 X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 615B6ECE58E for ; Mon, 7 Oct 2019 17:06:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2593F206C0 for ; Mon, 7 Oct 2019 17:06:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=android.com header.i=@android.com header.b="I3HJRjxJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2593F206C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=android.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B2E788E0005; Mon, 7 Oct 2019 13:06:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ADD5A8E0003; Mon, 7 Oct 2019 13:06:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9A41F8E0005; Mon, 7 Oct 2019 13:06:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0157.hostedemail.com [216.40.44.157]) by kanga.kvack.org (Postfix) with ESMTP id 746A08E0003 for ; Mon, 7 Oct 2019 13:06:44 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 0F3F1180AD803 for ; Mon, 7 Oct 2019 17:06:44 +0000 (UTC) X-FDA: 76017617928.19.knife87_83a697b795d X-HE-Tag: knife87_83a697b795d X-Filterd-Recvd-Size: 5253 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Mon, 7 Oct 2019 17:06:43 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id y22so9069325pfr.3 for ; Mon, 07 Oct 2019 10:06:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=android.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=Pb3uO7Vc16eJljt2wKmrwcVCszIvsw8hiSoBf84oSf4=; b=I3HJRjxJRRJjG7VKHs1KEvCrkgsB/RniewwwFGUBUDebBip82LpuOvj3Ze/id/wpvg cTlIBSaRihUk2+w9zXag2HCOK1BpZ1XHAnuwgiBtrx9OPI/Gyp8oadRwvx+BmF35IlaD i8PePkJwpRW2/uPBVbeZIVd31KQ3I66kBZ18uC+rT5eOPZxWapJELyH3671aTGktxqQJ uI7iJdnAmV3YYhXp17jbpqN2Xd6GgfwksKElGYT6OeIb8bGkDOq1OzbwZ9fKOSWTTjsw xVTfATKxspX8KvBcm5p5hOqVljFBIJt73toojOqqtXfqlodAiiGtT4YEs6h/756rg3Qh e21Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Pb3uO7Vc16eJljt2wKmrwcVCszIvsw8hiSoBf84oSf4=; b=kxQd87NqwGVoEUDNIA+hBEXm6v2oo972U6NgI9lGVWD77qSaMb/c/+8rXRGYHPZOhX sUKwCAuo8HjCp/takeHWw4JZzLpr10OXMOdUSTBr3hYTYQWmw2ZRsp/20UpmFdX+uI+0 d5R0x38xJST2jMzUNxeM8M99rgO1qyMX1QSv+cqJmDg0VmpgktcI+aoks08hS4rft/e7 RL+LdyhR5MIzmYzhwAH7D+sxpIEjD/cf6uVOwPBP5nKyD5zFaVDpNp5nkp3bkPZb9cQ4 G+hyyrumlVALH1JvYmEO2s9e15236iYnJU1DvtSgD7BHy8+9fTQgOnIg6SDj6AFjkyhI 4pzQ== X-Gm-Message-State: APjAAAXYqb/S8nlVgszOpY6hZ7sJK/OpMF3FaLFFLV6Dl7eQ8uuhq6cC SRHMxKQq5kp2zIAvhxN+42LneA== X-Google-Smtp-Source: APXvYqw503Ne0S2M+wJnt2JnXkcGb3V47BzFaV4/XRdG+V4626tYfa4aSVSSwtvIUouWEMrQy+/ffg== X-Received: by 2002:a62:2643:: with SMTP id m64mr34178671pfm.76.1570468002202; Mon, 07 Oct 2019 10:06:42 -0700 (PDT) Received: from nebulus.mtv.corp.google.com ([2620:15c:211:200:5404:91ba:59dc:9400]) by smtp.googlemail.com with ESMTPSA id k8sm12451614pgm.14.2019.10.07.10.06.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Oct 2019 10:06:41 -0700 (PDT) Subject: Re: [PATCH] mm: export cma alloc and release To: Christoph Hellwig Cc: Catalin Marinas , linux-kernel@vger.kernel.org, kernel-team@android.com, Andrew Morton , Yue Hu , Mike Rapoport , Will Deacon , Thomas Gleixner , Ryohei Suzuki , Doug Berger , Andrey Konovalov , Peng Fan , linux-mm@kvack.org, Robin Murphy References: <20191002212257.196849-1-salyzyn@android.com> <20191003085528.GB21629@arrakis.emea.arm.com> <20191005083753.GA14691@lst.de> <20191007165315.GA10317@lst.de> From: Mark Salyzyn Message-ID: <22ef8c58-2595-aba7-f72e-a2319622430d@android.com> Date: Mon, 7 Oct 2019 10:06:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191007165315.GA10317@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 10/7/19 9:53 AM, Christoph Hellwig wrote: > On Mon, Oct 07, 2019 at 09:50:31AM -0700, Mark Salyzyn wrote: >> On 10/5/19 1:37 AM, Christoph Hellwig wrote: >>> On Thu, Oct 03, 2019 at 09:55:28AM +0100, Catalin Marinas wrote: >>>> Aren't drivers supposed to use the DMA API for such allocations rather >>>> than invoking cma_*() directly? >>> Yes, they are. >> We have an engineer assigned to rewriting the ion memory driver to use >> dma_buf interfaces. Hopefully that effort will solve the problem of >> requiring these interfaces to be exported so that that driver (and others) >> can be modularized. >> >> Thanks for the reviews, drop this patch from the list and we will regroup, >> and accept that standing code in the kernel can not be modularized for the >> moment. > How is that different from the "DMA-BUF Heaps (destaging ION)" series > floating around? IDK, I am asking around because I am only superficially aware of that effort. Please view this as the left hand does not know what the right hand is doing. My issue was with a series of out-of-tree drivers that use the calls, and noted that currently the ion driver is using them as well, as rationalization for a 'user' for the export. I am pushing back on those out-of-tree drivers to switch their CMA interfaces to a modern approach as a result of these reviews; the result of this review had a positive effect because I was considering exporting them in the Android distro as a minimum, and now I am soundly rejecting that approach. Sincerely -- Mark Salyzyn