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=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 DACEFC64E7A for ; Tue, 1 Dec 2020 22:56:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2A4EE221FF for ; Tue, 1 Dec 2020 22:56:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A4EE221FF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 29B318D0003; Tue, 1 Dec 2020 17:56:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 247E38D0001; Tue, 1 Dec 2020 17:56:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 137078D0003; Tue, 1 Dec 2020 17:56:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0033.hostedemail.com [216.40.44.33]) by kanga.kvack.org (Postfix) with ESMTP id EC5AB8D0001 for ; Tue, 1 Dec 2020 17:55:59 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id B01178249980 for ; Tue, 1 Dec 2020 22:55:59 +0000 (UTC) X-FDA: 77546222838.06.shop16_0e0cc42273ae Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 8CAE91003C052 for ; Tue, 1 Dec 2020 22:55:59 +0000 (UTC) X-HE-Tag: shop16_0e0cc42273ae X-Filterd-Recvd-Size: 5073 Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Dec 2020 22:55:58 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id r2so2089819pls.3 for ; Tue, 01 Dec 2020 14:55:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xF9wBhJ/ruSDlA6Srxw1jVi0WbujgXsPSvslQZosYxU=; b=kJ3eowGG6g5XcJ9j4rRIQL+S4zJl30r+BhTrFCtmOwibuAKtR4DDYXdV8bKdDWROYr hIJWB+9HfBhIHCvajqYuY/YoA4dBE9kgYcK1rvjITkuv9vWV2vbKzN4c3Q2M/9dDbTvJ mb0KuF4fCvmofdUjb/UAqGCpTb4hHuzvX9Pp0eKJE0uGqhqHNCW8i/nE6BO94oySkznK JLSsVoxB7aGrcQt0uGkK+SXilz9hE+OhFDpfodutUmq7ZEyoOhnvKWj70Np9qJ5QN6o1 B7eFOzNhMNQr5jL8B58gtPE6Rx15ttucZ4kxgzye2HAVpNsA0P6gnZc5Q169xinM0Bka kbcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=xF9wBhJ/ruSDlA6Srxw1jVi0WbujgXsPSvslQZosYxU=; b=D+FC81WpEtWlfU+Z37Q/GzrPQZlwcOHUmvIDoumpuo6nXNxyZanSA9ScUXVrlTURsM Lj/4Cc9g41RE5+iwLT3D4rT5LQuu7OluGSE3sX2VWXe6/OGXgGHmgs4DTt0ItrQ52fzV 0Rz1zrGMA5Z3huKm2KO5ItKgZgSnU0h/V3gW1sa2sNs9bP67uFTtlLHHxoIyEyFPzVLx BkriV1Bd8s8L1GTeZ4eC/I8qeGXGnBRyBhPOXpL/XT8KB62hb8g9E/MKptBR5LBAhqcD SsD7XlvXhjgYvvi1rWCgCRdVZl6DvPrLAbYhfq/IXZgI80mrvogs7f7+a4kflm266qkX TFOw== X-Gm-Message-State: AOAM532ZztCC7v5QhdYpnzW3in72kd0lYTPXI+Bpt/C4APvIsVJN4UB/ /+UQlIyrSHC1psYdwZC9EEs= X-Google-Smtp-Source: ABdhPJy3f2TRP3AqnHaRLUzLECJ1htGQGvX3mrji3EHlmRSp8/8UXe2pBn1MoP8oA9an04VIieWPDQ== X-Received: by 2002:a17:90a:d308:: with SMTP id p8mr5051014pju.110.1606863357919; Tue, 01 Dec 2020 14:55:57 -0800 (PST) Received: from google.com ([2620:15c:211:201:7220:84ff:fe09:5e58]) by smtp.gmail.com with ESMTPSA id v196sm758721pfc.34.2020.12.01.14.55.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2020 14:55:56 -0800 (PST) Date: Tue, 1 Dec 2020 14:55:54 -0800 From: Minchan Kim To: John Stultz Cc: Andrew Morton , LKML , linux-mm , Hyesoo Yu , Matthew Wilcox , david@redhat.com, iamjoonsoo.kim@lge.com, vbabka@suse.cz, Suren Baghdasaryan , KyongHo Cho , John Dias , Hridya Valsaraju , Sumit Semwal , Brian Starkey , linux-media , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Rob Herring , Christian Koenig , "moderated list:DMA BUFFER SHARING FRAMEWORK" Subject: Re: [PATCH v2 4/4] dma-buf: heaps: add chunk heap to dmabuf heaps Message-ID: <20201201225554.GA3968963@google.com> References: <20201201175144.3996569-1-minchan@kernel.org> <20201201175144.3996569-5-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue, Dec 01, 2020 at 11:48:15AM -0800, John Stultz wrote: > On Tue, Dec 1, 2020 at 9:51 AM Minchan Kim wrote: > > Thanks for reworking and resending this! > > ... > > +static int __init chunk_heap_init(void) > > +{ > > + struct cma *default_cma = dev_get_cma_area(NULL); > > + struct dma_heap_export_info exp_info; > > + struct chunk_heap *chunk_heap; > > + > > + if (!default_cma) > > + return 0; > > + > > + chunk_heap = kzalloc(sizeof(*chunk_heap), GFP_KERNEL); > > + if (!chunk_heap) > > + return -ENOMEM; > > + > > + chunk_heap->order = CHUNK_HEAP_ORDER; > > + chunk_heap->cma = default_cma; > > + > > + exp_info.name = cma_get_name(default_cma); > > So, this would create a chunk heap name with the default CMA name, > which would be indistinguishable from the heap name used for the plain > CMA heap. > > Probably a good idea to prefix it with "chunk-" so the heap device > names are unique? That will give an impression to user that they are using different CMA area but that's not true. IMHO, let's be honest at this moment. When DT binding with CMA is landing down, it could provide unique name. Thought?