Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4735745pxu; Thu, 10 Dec 2020 04:21:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3M0eNs0k4K8KbAQnLxqWAVwYdPJtFDdO/I3Tb97S4CNOixi7wUplASj1ujzov7QYkMnug X-Received: by 2002:a05:6402:895:: with SMTP id e21mr6570399edy.284.1607602860445; Thu, 10 Dec 2020 04:21:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607602860; cv=none; d=google.com; s=arc-20160816; b=R3dckQTfyStSW7NOBm5nkFDuLHYCD/SyzFUcSw9mGKWniitdu1ArEWL19CCNCDuM8v +3C0G2sz+3/yANyGmY2NjlNxe6dDlGkDIknT61bgc6AziMW8OkLyPWcZAgiGp9AgLYUW z/gFMdbO4uwiXMfvnR9CuoT/htNxklWYhQdOMq5CqL7UXw//AyLDUZkLdrD9NLDOGRLW /47+8ObMdLWOSdGKXepsqSkEXK+Jdv8iXXpFpKHFS7xsKF2mer/SL4+FuK9n+ja30ELd //xLyVy41ph3EeY7qyx7L1R7YzXiajmhIBwCOnA6mRAvwFDzqhdSrbYNrzhH8hbO9irb da1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:date; bh=jiDYpzYTbh0SuYj3zFRRzvO55jpKx61Aikzkomja0mQ=; b=WuZxqew7JL86tKTFZZW58irqnz4b39w+fff2Fo42hgBq+SjHy6gNyGGNVlSUhhmQs0 /XyufwpXQiv9wCtCAdnuFIWz16SQrorn1mkWVlx31HxR1igpuwlnO1v6kI+tV5zssgQe YX4ZHkEx/Jjb4xF5Lr6oylYale5OYy9j4lG7z5+AdOYPTIi+cWNYN0R9Zn7t3l8Dxkz0 hW9AodXIuWZS8egT1iOV5f0V+x+d1boBx0qu6CRIumyEh5dZYv4K4RVY5TaMhnqsGIqv nkTEYGtHu6yP9RHkZcB+VqQUvDNhzmHY3T6hgUDvUsTPeGnRUXhk4rJMrmecL0LXEsvb 70dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oLeFeqt1; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si2462513ejb.695.2020.12.10.04.20.37; Thu, 10 Dec 2020 04:21:00 -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=@linuxfoundation.org header.s=korg header.b=oLeFeqt1; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730719AbgLJMHP (ORCPT + 99 others); Thu, 10 Dec 2020 07:07:15 -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-kernel@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