Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3111218pxb; Tue, 20 Apr 2021 00:22:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyn0fvRZ+V2sgyvcCoBYCXB2GMQoFgIf41AAyo/PBKxNeuAEp9OxpZRNJ7OQlonxxRiNKQR X-Received: by 2002:a63:5c19:: with SMTP id q25mr305901pgb.402.1618903334870; Tue, 20 Apr 2021 00:22:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618903334; cv=none; d=google.com; s=arc-20160816; b=v6p6YAvjH3GoGaw5VS2p8JkO+3wf8YYkyrDHTPK5yuQmsswL7UZwrLCUQXKkqxFZuC 8h5eQij+HiyIIHvyXroX2m0ZXNifH+Lw2rMZJDeZtIqE8kIuiodi5wcTRi7+EYeGww+l pKiZl3UCIVxglmHci1Zcj/Qccwn+qOxVcv8mDmh2Z7MDXZkrzx/LWC+zJ8XndqZ1MwzQ jS7elIDwVbpEQ49gIMemeanPFncDPVWKHmrdr/oIkQ9rHJwAqI2SaNPvVZ++Zhz5cS6j mp7IxEXnq929WiHBXFgTOHAsZIuNyqyuj8J9/r4AnFcD8bqkcsv0i/y1MkinHqkxoXvZ x/yQ== 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=qO2ogIc+WU/vqW2Dnks+aKAVo81P7dtBX39tp/zDUTQ=; b=GMbLhwV9TI0LfLhfWR8gH9gHneVna/BgCNEJMpZxNI3AiscbDDCHdDSWf05X/x3oo8 GhofzrZXcleR3Ml0tn3236qQMAnO9rO8lk3TaoZ/LD7jUPhm5fMue3goT4te/kheKGAy 2+QeL1L/D7grzVHkBSx1qWeMpZroXuyvgigk1/7fpFolxfvVkoGOyydj022b/PKof0sc jKqWEPdNMAbqDsEc5X/ymqm3BFF2eINOcpZ1qgsPzjVAhR8tI3Idmyak3KUEXdLmGM2l tct7PGs8PJ9lbY61el2CyCupOdzIjMQ+P/Ete9/GhcK359zx0EqNp7fUDwPvBxhhQIZo hx/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WZsQW3+Q; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w23si221606pgh.185.2021.04.20.00.22.01; Tue, 20 Apr 2021 00:22:14 -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=@kernel.org header.s=k20201202 header.b=WZsQW3+Q; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230328AbhDTHVY (ORCPT + 99 others); Tue, 20 Apr 2021 03:21:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:57402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229763AbhDTHVX (ORCPT ); Tue, 20 Apr 2021 03:21:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DAC9860C40; Tue, 20 Apr 2021 07:20:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618903252; bh=Ciqp0HqfGZibJ89pF/L2lKK2JBtAZcO03tptwL0YyAs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WZsQW3+Qm5LDVOpORw7z9UfDvMeJX1isMcl3sFgRXUSbDjLVZNniqkwH5+f5dsI1q LYfLhR1QyH6E+SIlzEDS5Q6+l1ccISlQ32/NcssVRZpoiHcFlJonoqWMfXuy2xYeVE v2gMsTtZHxpnK3A4vyIyx2+PKOo/Vx31Y/rALlPrzYVumKOUUb8HmPEJF63f2uB4E1 JVuMvvGp/guaaRRvG9vfxDN5C54CmcI8UoaRlUeTDtbQCT7Rpn4AF0aQgcE04pJVEH dWkd09ghtV6zXu5Exf9UBe+fDUks1vRvM3LpuuLUiBec4qWWR0bVMiTgvERaRXSLbu hufBhTUWwNMjw== Date: Tue, 20 Apr 2021 10:20:43 +0300 From: Mike Rapoport To: Michal Hocko 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, 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? > What I am trying to bring up with NUMA side is that the same problem can > happen on per-node basis. Let's say that some user consumes unexpectedly > large amount of dma-buf on a certain node. This can lead to observable > performance impact on anybody on allocating from that node and even > worse cause an OOM for node bound consumers. How do I find out that it > was dma-buf that has caused the problem? > > See where I am heading? -- Sincerely yours, Mike.