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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18366C4167B for ; Wed, 29 Nov 2023 20:45:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 94F056B0095; Wed, 29 Nov 2023 15:45:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8AFD36B00A1; Wed, 29 Nov 2023 15:45:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 701D36B00A3; Wed, 29 Nov 2023 15:45:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 5A5F46B0095 for ; Wed, 29 Nov 2023 15:45:04 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 2C0DC1205DA for ; Wed, 29 Nov 2023 20:45:04 +0000 (UTC) X-FDA: 81512171328.01.8537333 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by imf11.hostedemail.com (Postfix) with ESMTP id 32F4940007 for ; Wed, 29 Nov 2023 20:45:01 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=soleen.com header.s=google header.b=LIgpZdR+; dmarc=none; spf=pass (imf11.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.167.47 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701290702; a=rsa-sha256; cv=none; b=YqAQ8s6nwDbpw1NxNyILWFSOtxiBJc+8nOYpNuWbdMNf+M3OmXj6OoYER19ZQrHLxFyMhA MpJXGtN8gGHXLAstXPEtmxKJQ76KEA/KvJsmKUMBMWdKbnYFBRyrQxJaB22pG7E3Uql+cV jiW2wC1goWLkc31cZwEaplX6wUdNqMU= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=soleen.com header.s=google header.b=LIgpZdR+; dmarc=none; spf=pass (imf11.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.167.47 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701290702; h=from:from:sender:reply-to:subject:subject: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:dkim-signature; bh=tlZYiStM5KCC7J/v+177rjHqt9KWJCfJWFMkelab9t4=; b=6AGhYD20AFNcKdXQVHEDml6c4TC0zss2L9qMVLGKIO5nqqCkg9uRE+6ZT8L4FAyFnlOBYa cp7sX7Vw8PXTZk7JyYAiHZzfpbZDFnxhTOSQqij71jjADu6OnQwCK5nNN7sUFcl67qatcK klO7EqrMf2lFK2Qf2c6oBKAjHPX855E= Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-507bd19eac8so365508e87.0 for ; Wed, 29 Nov 2023 12:45:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1701290700; x=1701895500; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=tlZYiStM5KCC7J/v+177rjHqt9KWJCfJWFMkelab9t4=; b=LIgpZdR+n63tuS4JhnHZLTcdrHAIFn0HNEvs22OFpIMNTXoy5aaY+r7g91Tu05BkXA yGwvlN2/brEl1DItLIntkkaR96fEciIhBciM+8OaOyfLh8a4WJBszqvTSOXFxeRCBnYW sdWEu8ehw43VIfEde8mUeo+5+zMJVKmhO5NY+WoOWHJhfxjpMVGYMxzwt87LOio0pBxZ onjGnvAJ4qFxKNFySCSwOM0//9m7lXWxngDlL95Hh+shbD6OBs/tEChm2xF/R1ChWNDj dtYJgsPRLWNbrvWQDkqfW9krJD/hUYxnBddtO0eionWGQ7DJRloz4RtxYHwTguFWhcn3 0oeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701290700; x=1701895500; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tlZYiStM5KCC7J/v+177rjHqt9KWJCfJWFMkelab9t4=; b=v8LCAP8U8tc1o3S7UFsdNjtxFwEqfwV/Wk8Z+X8hI20ZTTqYdgFuAt+rjccqYltPe6 evzK1YKsAEe9vtqSsMX0xcqUlhXnr9ukqioprgZhSrKbZ2x+11LQhBinSXV6FjAgIJt6 XiMyD3gtsTO74k6LUowVCg17SvtUH3n2ecx//MLT7dL29d+newgf2LQ1j6411SX0lVMd NIJQOK2hi4eRsr2RuuMgMSGUK+9ifUlo17B3b6QhJ+f8F62Wx4F7ajWxuaquL4gcad+Z ZcLTc5ZAx2tCgWshky+lajqvRY2BWyfQShHTKDIMiapOF9UuSEQeAdrzKMZdI4wIB4T6 e8qA== X-Gm-Message-State: AOJu0Yx+Vv+xFyO/1AQp4yQf2XiThbe/5HcwPmjmgFfLTOH4cP6OzMF0 BAIGg2kQVPktWqOvUjWy+o9DhxCLmIvsyG+hGj/diA== X-Google-Smtp-Source: AGHT+IGMB2fUN71OTthlqnqBV10GCXDIRhuYgMFmlKYXWcCU4XgzYTup+BcRc5IJEjmMB4Fgw8Ibq0j5FX6Di+vVaiM= X-Received: by 2002:ac2:4a6f:0:b0:50b:cb50:401 with SMTP id q15-20020ac24a6f000000b0050bcb500401mr153882lfp.34.1701290700342; Wed, 29 Nov 2023 12:45:00 -0800 (PST) MIME-Version: 1.0 References: <20231128204938.1453583-1-pasha.tatashin@soleen.com> <20231128204938.1453583-9-pasha.tatashin@soleen.com> <1c6156de-c6c7-43a7-8c34-8239abee3978@arm.com> <20231128235037.GC1312390@ziepe.ca> <52de3aca-41b1-471e-8f87-1a77de547510@arm.com> <20231129200305.GI1312390@ziepe.ca> In-Reply-To: <20231129200305.GI1312390@ziepe.ca> From: Pasha Tatashin Date: Wed, 29 Nov 2023 15:44:21 -0500 Message-ID: Subject: Re: [PATCH 08/16] iommu/fsl: use page allocation function provided by iommu-pages.h To: Jason Gunthorpe Cc: Robin Murphy , akpm@linux-foundation.org, alex.williamson@redhat.com, alim.akhtar@samsung.com, alyssa@rosenzweig.io, asahi@lists.linux.dev, baolu.lu@linux.intel.com, bhelgaas@google.com, cgroups@vger.kernel.org, corbet@lwn.net, david@redhat.com, dwmw2@infradead.org, hannes@cmpxchg.org, heiko@sntech.de, iommu@lists.linux.dev, jasowang@redhat.com, jernej.skrabec@gmail.com, jonathanh@nvidia.com, joro@8bytes.org, kevin.tian@intel.com, krzysztof.kozlowski@linaro.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, lizefan.x@bytedance.com, marcan@marcan.st, mhiramat@kernel.org, mst@redhat.com, m.szyprowski@samsung.com, netdev@vger.kernel.org, paulmck@kernel.org, rdunlap@infradead.org, samuel@sholland.org, suravee.suthikulpanit@amd.com, sven@svenpeter.dev, thierry.reding@gmail.com, tj@kernel.org, tomas.mudrunka@gmail.com, vdumpa@nvidia.com, virtualization@lists.linux.dev, wens@csie.org, will@kernel.org, yu-cheng.yu@intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 32F4940007 X-Stat-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odCIeY9+pu2r0LnEa3GsDYXhWtKadO7IDamVH0Cvqzwl9/2xpO8ESVkaHYCV6aJqau1L0f7/9tdKyyUO1W509wQ6GFHbN5+LOikrskj+CzhDKrcMgEsxiFY9CxN4RFckR4jHWFDX4JbPzHdneduObyB2NSlxj9nYLR4irSxD8d/RZsNTxdj6KZx5rXVP31vxTKkSuqvmIVAhVC30ZHURv9b1zC5ACa8Y7UGNH/suanSBLKYvNij423UPTdSxTIQaEyYzyMupItdlnRIX9fg7JvTEBCpc1woOeapxF3Q15kZqA3A= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Wed, Nov 29, 2023 at 3:03=E2=80=AFPM Jason Gunthorpe wrot= e: > > On Wed, Nov 29, 2023 at 02:45:03PM -0500, Pasha Tatashin wrote: > > > > same kind of big systems where IOMMU pagetables would be of any conce= rn. > > > I believe some of the some of the "serious" NICs can easily run up > > > hundreds of megabytes if not gigabytes worth of queues, SKB pools, et= c. > > > - would you propose accounting those too? > > > > Yes. Any kind of kernel memory that is proportional to the workload > > should be accountable. Someone is using those resources compared to > > the idling system, and that someone should be charged. > > There is a difference between charged and accounted > > You should be running around adding GFP_KERNEL_ACCOUNT, yes. I already > did a bunch of that work. Split that out from this series and send it > to the right maintainers. I will do that. > > Adding a counter for allocations and showing in procfs is a very > different question. IMHO that should not be done in micro, the > threshold to add a new counter should be high. I agree, /proc/meminfo, should not include everything, however overall network consumption that includes memory allocated by network driver would be useful to have, may be it should be exported by device drivers and added to the protocol memory. We already have network protocol memory consumption in procfs: # awk '{printf "%-10s %s\n", $1, $4}' /proc/net/protocols | grep -v '\-1' protocol memory UDPv6 22673 TCPv6 16961 > There is definately room for a generic debugging feature to break down > GFP_KERNEL_ACCOUNT by owernship somehow. Maybe it can already be done > with BPF. IDK