Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3277111pxb; Tue, 19 Jan 2021 19:43:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwB06D1K6/0dEDMqiD+W7kAklW9rEt2cjs1TuMigq8aYbRVk7f6aNcJ8OF68Pn8rxE1bEDF X-Received: by 2002:a50:b282:: with SMTP id p2mr6098045edd.210.1611114210700; Tue, 19 Jan 2021 19:43:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611114210; cv=none; d=google.com; s=arc-20160816; b=hjiwFHkHSHDSySeuuPVqIrUuHhWiIvq9OcLCOdMwsF90fc5kX6Uqk/0m6UeEol6kaE Bga7Sy/JtzL1swQc91/dmaS1idAP6q+ieCoTgmRzZ/BWojh0pNJI7ItJ6lynZGNFQBvX wDwfHpVb9teIsSifmUkvdfQ9Fc4G7Bz3UoxglrASfXU6T86Pl8IGhYudUBucHZH1UaSj jUfqJ+mXnTME8zjAS27uNaTDUVK3aUWjGZV1cxyyBo+zE1Zag+Rm+iV9eK4p9PJCbK78 EOLjUCu0xQS7TmN+TozBX2XzQ0i2DSBktFQ/lwyZNXGkG9LIosmNvXKRJ/oZdIYxoL02 OGqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:user-agent :in-reply-to:mime-version:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=rZgDZraMnr9jBDuEWsE2WP8McrTrkZ19vERPl8fB60Q=; b=ReSuEEnIR09fUhWid0UKTvOdkotFPNxUvgFB4JY54wOveYNAneXSZz4Ek1OEcHsp+x ldU7mnUJB3Q31CtHnB+iDKkVgry5iIJgSWyrPECOrVl1HHMhTF5nySuIdLgkR/R7j6qx rSNdhi9hot2Oy4fqbLd+CjfODXvoh3qO4XbOl3meXlwXoYL/D/lPI2YAYfUJvSk/Oy3o XyyJeq41ndujq+snxgYGjCfN+Gq+yNvBD0NMkkK7+a+pD0yFnTW3+WJY8zGNmXdcY6Vm JNc06AcBiowh5GVqX30Jy7KrEWgHCZGFQuhnsoneiko2QhpJgMdTTKZD57AJMo8B8mXm wiTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=PqQjhwAp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h15si246318eje.285.2021.01.19.19.42.46; Tue, 19 Jan 2021 19:43:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=PqQjhwAp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731783AbhATDkp (ORCPT + 99 others); Tue, 19 Jan 2021 22:40:45 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:45868 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731377AbhATDkl (ORCPT ); Tue, 19 Jan 2021 22:40:41 -0500 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20210120033950epoutp0388eddb60c049f75110410c361d1c4a2c~b06NuHF440294902949epoutp036 for ; Wed, 20 Jan 2021 03:39:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20210120033950epoutp0388eddb60c049f75110410c361d1c4a2c~b06NuHF440294902949epoutp036 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1611113990; bh=rZgDZraMnr9jBDuEWsE2WP8McrTrkZ19vERPl8fB60Q=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PqQjhwApwGOp4Sab4Vy8LbYTvNiyYJmKth5xub2901ThbIiJi4iw3ttt1Qv2jYFH4 kNtW5edRaeOkWwtdaEndVtXg+OzNjUrAiV4prmCfHnWqRaiScgIV8SpE8HyuHCYrEP bblOrSZSQ0bbXIJv7jYzB9d0JvpEy0vNygCmTjxQ= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20210120033949epcas2p1bd9da9bcf462f4f6901d1ef4dbbce08b~b06NC2F6c1669716697epcas2p1P; Wed, 20 Jan 2021 03:39:49 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.182]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4DLB9H6jHlz4x9Pt; Wed, 20 Jan 2021 03:39:47 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id EF.25.05262.306A7006; Wed, 20 Jan 2021 12:39:47 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20210120033947epcas2p284c0b27dded3b221de99c8814c82cec9~b06Kvld4H0331703317epcas2p25; Wed, 20 Jan 2021 03:39:47 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210120033947epsmtrp26448b1685195f077009fccee0e0a4ffc~b06KuqmBE2994629946epsmtrp2N; Wed, 20 Jan 2021 03:39:47 +0000 (GMT) X-AuditID: b6c32a47-b81ff7000000148e-35-6007a603898e Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 53.3D.13470.306A7006; Wed, 20 Jan 2021 12:39:47 +0900 (KST) Received: from KEI (unknown [12.36.155.227]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210120033947epsmtip22fafccb86b88a57206d829799a5feb84~b06KhYEJu1166511665epsmtip2F; Wed, 20 Jan 2021 03:39:47 +0000 (GMT) Date: Wed, 20 Jan 2021 12:32:08 +0900 From: Hyesoo Yu To: Minchan Kim Cc: John Stultz , Andrew Morton , linux-mm , LKML , david@redhat.com, Michal Hocko , Suren Baghdasaryan , KyongHo Cho , John Dias , Hridya Valsaraju , Sumit Semwal , linux-media , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Christoph Hellwig , Rob Herring , "moderated list:DMA BUFFER SHARING FRAMEWORK" Subject: Re: [PATCH v3 4/4] dma-buf: heaps: add chunk heap to dmabuf heaps Message-ID: <20210120033208.GA179511@KEI> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Brightmail-Tracker: H4sIAAAAAAAAA02Ta0xTZxjH855zenrA1R0qjldMHKsjjs5CWyg7MlhMUHfGJGNj+6AxliMc S0Npu54WGUsmMzjQoKIYhojYCIIwEFYuMhgyboJdlSmDD8xtUi4T2IBxkWxctpaDCd9+z+X/ XPK8L4GKh3FfQqs3syY9o5PgnlhDRwAlQ0uFcfLbOSFUYXUlTi1U/4tS1zsfCqgfc24g1MyX txBq0epEKceSjJr/eQih+poKcSq7pl5A/Vb5n4D6/fxeqnRhWkitnmsD1OmWTiFl/3VOSOU+ tuJ7vWirzULX3pLStoozOG2bvSSknwx8j9M9+UsY/cvqMEpP3+3H6fN1FYCuruvH6DnbjphN h3XhiSyTwJr8WH28IUGr10RI3o9VR6pVoXKFTLGHekvip2eS2QjJvoMxsgNanWsliV8Ko7O4 XDEMx0mC3gk3GSxm1i/RwJkjJKwxQWdUKIyBHJPMWfSawHhDcphCLleqXJlxusS6kXhjs1eq o3sKTQfnNp8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dBjwaZSj80rtDw2repk89j0aRK7x51re9g8Tsz4 zeJx+99jZo/3+66yefRtWcXosX7LVRaPz5vkArijuGxSUnMyy1KL9O0SuDIuHH7FXvCPr6L3 6BSmBsaX3F2MnBwSAiYSB5ZfZuli5OIQEtjNKHFo3k4miISkxKzPJ6FsYYn7LUdYQWwhgfuM EpMeFnQxcnCwCKhKHL1sBRJmE1CXOLFlGSOILSKgIvHn6T9GkJnMAvtZJbZu2soOkhAW8JLY P3k2G4jNK6Apcb7zMxvE4iVMErtOfmeGSAhKnJz5hAXEZhbQkrjx7yUTyDJmAWmJ5f84QMKc QOH1M5azgoRFgZa9Olg/gVFwFpLmWUiaZyE0L2BkXsUomVpQnJueW2xYYJiXWq5XnJhbXJqX rpecn7uJERyZWpo7GLev+qB3iJGJg/EQowQHs5IIb9NftgQh3pTEyqrUovz4otKc1OJDjNIc LErivBe6TsYLCaQnlqRmp6YWpBbBZJk4OKUamNpvheb9lYpgdtt2vaNUuG/Wb9aQTTuW7uG8 tmH3DYdNyQde/t0cUbw21VtE+T3XpAusR96qSs6ZxZZ+sn/L36fO22c45mzSnXLdgC9/41H7 YNUVxWZ3xIu42RKEN3w7yV/DeeC9nc7tqaYiFhYpTw2ulUTq5Rltv5i2e7+117vQX1kp6zyb p/G7aYp4/pU49PpQrYZPxX8TpaOlGSlBtj+FVv87cmzDok3zBM+ekGpkKJ978K00s4y1d8U9 PTFBq8WR/+TOC118EP7Wd13w5L0MBzWClq946n2HQ0tRle3b0R2+Sx5EbpIL5Hln/m/t+icl Mz5Ychp172QrPbks8SvPd1l7nSKZpIemD4Md9yqxFGckGmoxFxUnAgCRTJe5OwMAAA== X-CMS-MailID: 20210120033947epcas2p284c0b27dded3b221de99c8814c82cec9 X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----mNH5knzzkG0Mgn_4LE2W.vyl1feJgd8C-RJhbgQvYSfbcfg-=_700d_" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210119203646epcas2p2622d11cb2cf90a7bd24050a5238e78ef References: <20210113012143.1201105-1-minchan@kernel.org> <20210113012143.1201105-5-minchan@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ------mNH5knzzkG0Mgn_4LE2W.vyl1feJgd8C-RJhbgQvYSfbcfg-=_700d_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline On Tue, Jan 19, 2021 at 12:36:40PM -0800, Minchan Kim wrote: > On Tue, Jan 19, 2021 at 10:29:29AM -0800, John Stultz wrote: > > On Tue, Jan 12, 2021 at 5:22 PM Minchan Kim wrote: > > > > > > From: Hyesoo Yu > > > > > > This patch supports chunk heap that allocates the buffers that > > > arranged into a list a fixed size chunks taken from CMA. > > > > > > The chunk heap driver is bound directly to a reserved_memory > > > node by following Rob Herring's suggestion in [1]. > > > > > > [1] https://lore.kernel.org/lkml/20191025225009.50305-2-john.stultz@linaro.org/T/#m3dc63acd33fea269a584f43bb799a876f0b2b45d > > > > > > Signed-off-by: Hyesoo Yu > > > Signed-off-by: Hridya Valsaraju > > > Signed-off-by: Minchan Kim > > > --- > > ... > > > +static int register_chunk_heap(struct chunk_heap *chunk_heap_info) > > > +{ > > > + struct dma_heap_export_info exp_info; > > > + > > > + exp_info.name = cma_get_name(chunk_heap_info->cma); > > > > One potential issue here, you're setting the name to the same as the > > CMA name. Since the CMA heap uses the CMA name, if one chunk was > > registered as a chunk heap but also was the default CMA area, it might > > be registered twice. But since both would have the same name it would > > be an initialization race as to which one "wins". > > Good point. Maybe someone might want to use default CMA area for > both cma_heap and chunk_heap. I cannot come up with ideas why we > should prohibit it atm. > > > > > So maybe could you postfix the CMA name with "-chunk" or something? > > Hyesoo, Any opinion? > Unless you have something other idea, let's fix it in next version. > I agree that. It is not good to use heap name directly as cma name. Let's postfix the name with '-chunk' Thanks, Regards. ------mNH5knzzkG0Mgn_4LE2W.vyl1feJgd8C-RJhbgQvYSfbcfg-=_700d_ Content-Type: text/plain; charset="utf-8" ------mNH5knzzkG0Mgn_4LE2W.vyl1feJgd8C-RJhbgQvYSfbcfg-=_700d_--