Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2413162pxb; Mon, 19 Apr 2021 05:18:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFVev5hBDh34xqJsA42imBq06US14uuPfhr78zX8U/iBP59C82b4KC5X0Ls0n5MR/H4Lji X-Received: by 2002:a05:6402:1109:: with SMTP id u9mr25651727edv.174.1618834711051; Mon, 19 Apr 2021 05:18:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618834711; cv=none; d=google.com; s=arc-20160816; b=UK8bbwXLYWcjhETH7tZ69dfohRFl/vChPLFdtgWIsijVEpI7U7Kyuwltqlul/W+b0+ 265a05KIVPgWFa0K+Zj8F+CC0VUYe7nUATlLqWRutbXE5Tpjp/lHIVS4Q+2NDMEZuZfi wgCEyZcH5ONwKw0RRD/2ojhX23KDXNbBkfTgT/wBEiZLfzkExy///VQ90OeW8BHMzbzY S7z/BklKvBmgo/hNi8EHTQCsFM4ZWPojVCjhm97vKjBaJ3uQvUaXIo+GGcuPffyekAW+ hFB5bi6BCTe6btLZKyyOoPdG5gw9SFTcX8rsTgy2z5aeAd3G90RbaB1XP1Ym5Znn+9OL 1P2Q== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1QG3FZepALNOXbfOMZTZu4JoFLk2WHpD1FD7YNk9rFs=; b=nqAS3NHEAqWe6GuQKZy/gV+0fV5/IYgWflXV0mlovSN4z/6xU9eQ/WTcMml0mQgCvN VSd3jwHWqJWotYpPC3g5QHNNmVcDRQCQou242tSgZYlzX9WW/VSPpK8siAg9lh3S/KdZ hH2AUvzGsOLrxX7QVvRnjpaQTv5bND6bwvCUCV8t1bV6nl34moQCOPUjYa6hbDHd+BhW JS0WA6XroySufR7GH6SBsd2fO/+VgVirhFEbLaLalkbhTQfhlMHmZFewZzyH1Bg74Bn/ CPVSphLqCNSQW65CK75EDm8rAM+kH1FiHnxXuOF6koHdiKe81DOpNfSVQkCjZSOv34cP bkfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=RhyVY6F1; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y15si11968489ejb.688.2021.04.19.05.18.07; Mon, 19 Apr 2021 05:18:31 -0700 (PDT) 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=@suse.com header.s=susede1 header.b=RhyVY6F1; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239075AbhDSMRY (ORCPT + 99 others); Mon, 19 Apr 2021 08:17:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:59482 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239056AbhDSMRX (ORCPT ); Mon, 19 Apr 2021 08:17:23 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1618834612; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1QG3FZepALNOXbfOMZTZu4JoFLk2WHpD1FD7YNk9rFs=; b=RhyVY6F1oXXJJ0u02/my9iujY24PbMKXnhcPvKnsIWwqBhMALOOoQ7RunU7EpQkZkfxyBm lx6Qa712ew80FHgx4LWwEE0vXZvseFWiNf2aX/33YqJTRPqlJj6YSOwl3tET9DaVJ8jqnA NFsJCiCri0lP+QT64xWntvhNif6TALw= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B2094AF65; Mon, 19 Apr 2021 12:16:52 +0000 (UTC) Date: Mon, 19 Apr 2021 14:16:51 +0200 From: Michal Hocko To: Peter Enderborg Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Sumit Semwal , Christian =?iso-8859-1?Q?K=F6nig?= , Alexey Dobriyan , Andrew Morton , Muchun Song , Roman Gushchin , Shakeel Butt , NeilBrown , Sami Tolvanen , Mike Rapoport , linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, Matthew Wilcox Subject: Re: [PATCH v4] dma-buf: Add DmaBufTotal counter in meminfo Message-ID: References: <20210417104032.5521-1-peter.enderborg@sony.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210417104032.5521-1-peter.enderborg@sony.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat 17-04-21 12:40:32, Peter Enderborg wrote: > This adds a total used dma-buf memory. Details > can be found in debugfs, however it is not for everyone > and not always available. dma-buf are indirect allocated by > userspace. So with this value we can monitor and detect > userspace applications that have problems. The changelog would benefit from more background on why this is needed, and who is the primary consumer of that value. I cannot really comment on the dma-buf internals but I have two remarks. Documentation/filesystems/proc.rst needs an update with the counter explanation and secondly is this information useful for OOM situations analysis? If yes then show_mem should dump the value as well. From the implementation point of view, is there any reason why this hasn't used the existing global_node_page_state infrastructure? -- Michal Hocko SUSE Labs