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.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 4BA98C4361B for ; Thu, 10 Dec 2020 12:06:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D2F1823D9B for ; Thu, 10 Dec 2020 12:06:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2F1823D9B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 247B36E051; Thu, 10 Dec 2020 12:06:19 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 52C0F6E051 for ; Thu, 10 Dec 2020 12:06:18 +0000 (UTC) Date: Thu, 10 Dec 2020 13:07:32 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1607601977; bh=7+XUs0NKgoibxWSzN421h7xPCAuuCw7byH4TQnvEGNw=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=oLeFeqt1pFET44DeiiSlhpvd2a6K2KZr6n0cBqcNsNx771+9H5PVIOkPbJucQu4u/ tqbg1OacZoFarVqzvGXDaM3wAp3VMknJUO2TG5c+1KksB3zFrWz7f6ra6xII51BqSz sT8IhGsd63xCbp3XdM5LTVkVLgdSi4atIBmDoym0= From: Greg KH To: Daniel Vetter Subject: Re: [PATCH] dmabuf: Add the capability to expose DMA-BUF stats in sysfs Message-ID: References: <20201210044400.1080308-1-hridya@google.com> <20201210102727.GE401619@phenom.ffwll.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Android Kernel Team , Linux Kernel Mailing List , dri-devel , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Hridya Valsaraju , Suren Baghdasaryan , Christian =?iso-8859-1?Q?K=F6nig?= , "open list:DMA BUFFER SHARING FRAMEWORK" Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Dec 10, 2020 at 12:26:01PM +0100, Daniel Vetter wrote: > On Thu, Dec 10, 2020 at 11:55 AM Greg KH wro= te: > > > > On Thu, Dec 10, 2020 at 11:27:27AM +0100, Daniel Vetter wrote: > > > On Thu, Dec 10, 2020 at 11:10:45AM +0100, Greg KH wrote: > > > > On Thu, Dec 10, 2020 at 10:58:50AM +0100, Christian K=F6nig wrote: > > > > > In general a good idea, but I have a few concern/comments here. > > > > > > > > > > Am 10.12.20 um 05:43 schrieb Hridya Valsaraju: > > > > > > This patch allows statistics to be enabled for each DMA-BUF in > > > > > > sysfs by enabling the config CONFIG_DMABUF_SYSFS_STATS. > > > > > > > > > > > > The following stats will be exposed by the interface: > > > > > > > > > > > > /sys/kernel/dmabuf//exporter_name > > > > > > /sys/kernel/dmabuf//size > > > > > > /sys/kernel/dmabuf//dev_map_info > > > > > > > > > > > > The inode_number is unique for each DMA-BUF and was added earli= er [1] > > > > > > in order to allow userspace to track DMA-BUF usage across diffe= rent > > > > > > processes. > > > > > > > > > > > > Currently, this information is exposed in > > > > > > /sys/kernel/debug/dma_buf/bufinfo. > > > > > > However, since debugfs is considered unsafe to be mounted in pr= oduction, > > > > > > it is being duplicated in sysfs. > > > > > > > > > > Mhm, this makes it part of the UAPI. What is the justification fo= r this? > > > > > > > > > > In other words do we really need those debug information in a pro= duction > > > > > environment? > > > > > > > > Production environments seem to want to know who is using up memory= :) > > > > > > This only shows shared memory, so it does smell a lot like $specific_= issue > > > and we're designing a narrow solution for that and then have to carry= it > > > forever. > > > > I think the "issue" is that this was a feature from ion that people > > "missed" in the dmabuf move. Taking away the ability to see what kind > > of allocations were being made didn't make a lot of debugging tools > > happy :( > = > If this is just for dma-heaps then why don't we add the stuff back > over there? It reinforces more that the android gpu stack and the > non-android gpu stack on linux are fairly different in fundamental > ways, but that's not really new. Back "over where"? dma-bufs are not only used for the graphics stack on android from what I can tell, so this shouldn't be a gpu-specific issue. confused, greg k-h _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel 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=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 6136DC433FE for ; Thu, 10 Dec 2020 12:07:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0604123D9B for ; Thu, 10 Dec 2020 12:07:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732048AbgLJMHK (ORCPT ); Thu, 10 Dec 2020 07:07:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:54830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726158AbgLJMG6 (ORCPT ); Thu, 10 Dec 2020 07:06:58 -0500 Date: Thu, 10 Dec 2020 13:07:32 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1607601977; bh=7+XUs0NKgoibxWSzN421h7xPCAuuCw7byH4TQnvEGNw=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=oLeFeqt1pFET44DeiiSlhpvd2a6K2KZr6n0cBqcNsNx771+9H5PVIOkPbJucQu4u/ tqbg1OacZoFarVqzvGXDaM3wAp3VMknJUO2TG5c+1KksB3zFrWz7f6ra6xII51BqSz sT8IhGsd63xCbp3XdM5LTVkVLgdSi4atIBmDoym0= From: Greg KH To: Daniel Vetter Cc: Christian =?iso-8859-1?Q?K=F6nig?= , Suren Baghdasaryan , Linux Kernel Mailing List , dri-devel , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Hridya Valsaraju , Android Kernel Team , "open list:DMA BUFFER SHARING FRAMEWORK" Subject: Re: [PATCH] dmabuf: Add the capability to expose DMA-BUF stats in sysfs Message-ID: References: <20201210044400.1080308-1-hridya@google.com> <20201210102727.GE401619@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Thu, Dec 10, 2020 at 12:26:01PM +0100, Daniel Vetter wrote: > On Thu, Dec 10, 2020 at 11:55 AM Greg KH wrote: > > > > On Thu, Dec 10, 2020 at 11:27:27AM +0100, Daniel Vetter wrote: > > > On Thu, Dec 10, 2020 at 11:10:45AM +0100, Greg KH wrote: > > > > On Thu, Dec 10, 2020 at 10:58:50AM +0100, Christian König wrote: > > > > > In general a good idea, but I have a few concern/comments here. > > > > > > > > > > Am 10.12.20 um 05:43 schrieb Hridya Valsaraju: > > > > > > This patch allows statistics to be enabled for each DMA-BUF in > > > > > > sysfs by enabling the config CONFIG_DMABUF_SYSFS_STATS. > > > > > > > > > > > > The following stats will be exposed by the interface: > > > > > > > > > > > > /sys/kernel/dmabuf//exporter_name > > > > > > /sys/kernel/dmabuf//size > > > > > > /sys/kernel/dmabuf//dev_map_info > > > > > > > > > > > > The inode_number is unique for each DMA-BUF and was added earlier [1] > > > > > > in order to allow userspace to track DMA-BUF usage across different > > > > > > processes. > > > > > > > > > > > > Currently, this information is exposed in > > > > > > /sys/kernel/debug/dma_buf/bufinfo. > > > > > > However, since debugfs is considered unsafe to be mounted in production, > > > > > > it is being duplicated in sysfs. > > > > > > > > > > Mhm, this makes it part of the UAPI. What is the justification for this? > > > > > > > > > > In other words do we really need those debug information in a production > > > > > environment? > > > > > > > > Production environments seem to want to know who is using up memory :) > > > > > > This only shows shared memory, so it does smell a lot like $specific_issue > > > and we're designing a narrow solution for that and then have to carry it > > > forever. > > > > I think the "issue" is that this was a feature from ion that people > > "missed" in the dmabuf move. Taking away the ability to see what kind > > of allocations were being made didn't make a lot of debugging tools > > happy :( > > If this is just for dma-heaps then why don't we add the stuff back > over there? It reinforces more that the android gpu stack and the > non-android gpu stack on linux are fairly different in fundamental > ways, but that's not really new. Back "over where"? dma-bufs are not only used for the graphics stack on android from what I can tell, so this shouldn't be a gpu-specific issue. confused, greg k-h