Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3126231pxb; Tue, 20 Apr 2021 00:48:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyt6SuVdC35EOrugLwGLuFzpEl8KO93NvKX6FlD1pa9E1C5W4gICB6Auz/Dia9AS191NT1D X-Received: by 2002:a17:902:e546:b029:ec:a7f5:2a88 with SMTP id n6-20020a170902e546b02900eca7f52a88mr9000359plf.21.1618904934811; Tue, 20 Apr 2021 00:48:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618904934; cv=none; d=google.com; s=arc-20160816; b=iFQzJY3QPYawD1L/5J0sg3J337kxim3/rjONVM2aPWaIqA6trzmBvifrK0S1vVn5kM NUI4tojlFJNen3w/02rTdaDDNgnVkeM6E5ycUniJkRxa7cx7aCKm7LwXh9w1j5dYcCiK GOZIx4WqklxcNSmfQlQ9nsLlkl9e+FgVNW5rV5/bY7Gu2TEzbd/OcF4oz9yXQzGiTxqc 2uXIJtPUOWusfgK6o8xFi6DdY/Tcn/Z+Zf9x0y5cClAZBbU41wVVKNE5dLAH0G4PExXy xZJLWcC1OX6GP+aEmsh4uOq3US636EFceaGrQP65ET+bZxS7we7/YtHq8H5KCKANmoIn 5ziA== 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:date:dkim-signature; bh=jsJz6T5xzjiEAYgDgi3ekTQU/jrutFlTvtKmt7SZ3tY=; b=NpFhV6YvaefnMWwMGR5wdEwskEgXG6V8EFCPvjpWKQXZVj/pMmqEOASW/La9uJeeNi +CiC6LhV1TcBlPhUvkKqOmgz1NKdIk/iRhkesaSoYxuXIQab2gNLjSDssnX5ge28SR/N tAXlXphhTLN58eUzxm0SVQzosrL1wmO/fPIQkr4b1iMAmJn+kiOV8cgtnR3HI2Bgq8wA g2xEIRSdlB2YYmyxEoQVtTps4SaiHGMNy/oRJO0QE60Kguaa2ds9qOckw3bNRM+HaE9k oru//ME2jGtXQ4UhVCX6nXiuWw17NAkpSTufK5+iFaabVnQy+qpkvAQ0PsgIw+4zZz7k MH4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="g/KlVMsF"; 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 m12si10521247plc.189.2021.04.20.00.48.40; Tue, 20 Apr 2021 00:48:54 -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="g/KlVMsF"; 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 S229843AbhDTHsR (ORCPT + 99 others); Tue, 20 Apr 2021 03:48:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:36608 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbhDTHsQ (ORCPT ); Tue, 20 Apr 2021 03:48:16 -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=1618904864; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jsJz6T5xzjiEAYgDgi3ekTQU/jrutFlTvtKmt7SZ3tY=; b=g/KlVMsFWzGBU2P5DBhoIdinsrP/K9S9LSGnXu7OBhG91Hnl3TFlZYNIUB9mGJMlyr8Iqs PMYKPPniJOQUj9NplFqLgsz6o4iQoOqbF35nGCmbYY1DYQZc0j+HQD2/Ie5Al8UQG1K7yp PybXVfV5m9ApHQlT+lB4JmFxkJGA3LU= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 69CC6B23F; Tue, 20 Apr 2021 07:47:44 +0000 (UTC) Date: Tue, 20 Apr 2021 09:47:43 +0200 From: Michal Hocko To: Mike Rapoport Cc: Christian =?iso-8859-1?Q?K=F6nig?= , Peter.Enderborg@sony.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, sumit.semwal@linaro.org, adobriyan@gmail.com, akpm@linux-foundation.org, songmuchun@bytedance.com, guro@fb.com, shakeelb@google.com, neilb@suse.de, samitolvanen@google.com, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, willy@infradead.org Subject: Re: [PATCH v4] dma-buf: Add DmaBufTotal counter in meminfo Message-ID: References: <20210417104032.5521-1-peter.enderborg@sony.com> <23aa041b-0e7c-6f82-5655-836899973d66@sony.com> <07ed1421-89f8-8845-b254-21730207c185@amd.com> 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 Tue 20-04-21 10:20:43, Mike Rapoport wrote: > On Tue, Apr 20, 2021 at 09:04:51AM +0200, Michal Hocko wrote: > > On Mon 19-04-21 18:37:13, Christian K?nig wrote: > > > Am 19.04.21 um 18:11 schrieb Michal Hocko: > > [...] > > > > The question is not whether it is NUMA aware but whether it is useful to > > > > know per-numa data for the purpose the counter is supposed to serve. > > > > > > No, not at all. The pages of a single DMA-buf could even be from different > > > NUMA nodes if the exporting driver decides that this is somehow useful. > > > > As the use of the counter hasn't been explained yet I can only > > speculate. One thing that I can imagine to be useful is to fill gaps in > > our accounting. It is quite often that the memroy accounted in > > /proc/meminfo (or oom report) doesn't add up to the overall memory > > usage. In some workloads the workload can be huge! In many cases there > > are other means to find out additional memory by a subsystem specific > > interfaces (e.g. networking buffers). I do assume that dma-buf is just > > one of those and the counter can fill the said gap at least partially > > for some workloads. That is definitely useful. > > A bit off-topic. > > Michal, I think it would have been nice to have an explanation like above > in Documentation/proc/meminfo, what do you say? Not sure which specific parts (likely the unaccounted memory?) but sure why not. Our /proc/meminfo is rather underdocumented. More information cannot hurt. -- Michal Hocko SUSE Labs