Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3097326rdb; Tue, 26 Dec 2023 16:25:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+guf32w+iRHqNXD9zgertMDF5Np4lxUCRdGCoFHh5rfTVh517BXFRFXdRLGVR2kE6m1l5 X-Received: by 2002:a19:f501:0:b0:50e:76d1:b9c5 with SMTP id j1-20020a19f501000000b0050e76d1b9c5mr759496lfb.60.1703636748710; Tue, 26 Dec 2023 16:25:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703636748; cv=none; d=google.com; s=arc-20160816; b=dvw7ysu/sxI6v5A2YXMzPcq9dshUb42YQ2Vgaa4U86EwCbkxxcdZNR/pd56Jua+rD+ 0IYr8Ici92NT2RUuIrclA7ErRpki7UoYS2vnIS4AwcT9PDzy7qJotu1DdTkUQafZmEHr hRN/Y0SAQpAfchQC1cNeWvfB88p9fdn8rAPVM3K5Srv5eaPS9Nd1jP7rAvrN6nKKUD70 KLWH5BmkhqUTK0c0raXVUXdthYA/BkVu8DqtO7VKXZzN7pEIlsLr96kUfbnrxaIvRt2g 4aguDWe7WdirKKGPjBIRB40QrwIWUAQlZNgzQsp1PqimuAUUnqS8eF1Cs4vKIyF0TZR0 f4cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=8yhvNEPy1OdHxiHajFepdZmy+iFIGCud+lbMtAIqjO0=; fh=feqKkw1tWMUOXs1A45sAU9mziDf631D8optW9TOFsxM=; b=E0ZBmszpvmFLF/2jaNihHDN1dnBUSmh+YdKXCzbpzlJTKIHFHoinUXSuAXvnp/v8kV s3W5o4zWiqPv/pR7e0I9b5zyhV57MyACpyJPqTbw19LNx6EWR8KBn+SYDjuMRLNSK2mY wuvkhOZKTzZnDkM6XIoySMZy/9TaphZMnTwTyBus+dYMJT0kWEjdGIOgrRFalx0JY9tM 4MmnQtaZ44utOZ7blyrkNxDrsthLfThGLPGNF2mY1fFbtAUyqfZqKgBaQJzVIp8tjH2c jzK+8bp/cWhSxiW7XetGn1x5qZcXRF8ioJlxBdu9ZnL+PXCMcrjYRPhl7y60nQ6pezcz f9Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RNW16Zt2; spf=pass (google.com: domain of linux-kernel+bounces-11733-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11733-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id wh16-20020a170906fd1000b00a2357fa1b9fsi5586321ejb.409.2023.12.26.16.25.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 16:25:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11733-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RNW16Zt2; spf=pass (google.com: domain of linux-kernel+bounces-11733-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11733-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 729E91F21AAC for ; Wed, 27 Dec 2023 00:25:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E49A1FBE; Wed, 27 Dec 2023 00:25:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RNW16Zt2" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A56B23D2 for ; Wed, 27 Dec 2023 00:25:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1d3ea8d0f9dso464585ad.1 for ; Tue, 26 Dec 2023 16:25:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1703636732; x=1704241532; darn=vger.kernel.org; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=8yhvNEPy1OdHxiHajFepdZmy+iFIGCud+lbMtAIqjO0=; b=RNW16Zt25HZlvdgAj3JTlgY7UzNeT6dqABvLneLoxoT6r5i93Tp0RrDipmAgUte3SH Ohi9Ej4ZH6vkJw4CZbP6v6GnuFERbyT2Y1gR56FS1oZME3S7Gp5k2IKfzkR40+nO3YFb vNbMsdkOGTcGcLZ3eqEUepvsO77lTXhIsTde5OteRPQ+/0UnxiqBcvQV+naL7GBMFw/Z p5eXjpRwbmRch1E2QMFirvCZL/G9yKV34ZWGHeN5+8V6awa2rLLAHcqCM7GxiivyNVrs MS8Nm6299+VSrfHnhN2vyKO89PE+Oj17n/JJtm8ZgLrSksFE83kHkj+GEyJ0+9dcNynj 3Znw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703636732; x=1704241532; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8yhvNEPy1OdHxiHajFepdZmy+iFIGCud+lbMtAIqjO0=; b=JoQ5RvwU0myxhzHf1vxmHCAu1KOZVdqJZLnUZxerBaLFvEufnPrWQYTCSQnXcriNxX To4V07N2f8Gz8glut2mMCkhnbRgvSeyr4bvJXbhm19aelx6g1CsMbVvQJXlbz4hjugUo PzT1fD2+G91uwYUYQchTbf+YPtHxQiu/1ZpEAm3iq5Nc0DZi6v8XyA9NYl6p/aqQcnoH 7a7YxZ2OLUVINSTRQPCuJsgKuFrzoxasbbngfeglObu0QqoNfu7zO+aO23KipK/sHuFS BEJRmn/iRndh+H2yEHm5AfdYgV6NC/JnwDctVF/upQhlIpwPQQzEnf6lClc5pBIsiiTQ VRKQ== X-Gm-Message-State: AOJu0Yx1hf5W/jjGYIcPnsessoJqfBigJHrc7fV6DzMK2Ky27SOONdCD qgJAQEfAT6ku5S21AVWS89I8m9hN2+jq X-Received: by 2002:a17:902:f684:b0:1d4:55b3:465f with SMTP id l4-20020a170902f68400b001d455b3465fmr239910plg.25.1703636731663; Tue, 26 Dec 2023 16:25:31 -0800 (PST) Received: from [2620:0:1008:15:5a8c:89e6:ca2f:ea30] ([2620:0:1008:15:5a8c:89e6:ca2f:ea30]) by smtp.gmail.com with ESMTPSA id w7-20020a170902e88700b001d072365b87sm10636289plg.106.2023.12.26.16.25.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 16:25:31 -0800 (PST) Date: Tue, 26 Dec 2023 16:25:30 -0800 (PST) From: David Rientjes To: Pasha Tatashin cc: akpm@linux-foundation.org, 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, jernej.skrabec@gmail.com, jonathanh@nvidia.com, joro@8bytes.org, krzysztof.kozlowski@linaro.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, m.szyprowski@samsung.com, paulmck@kernel.org, rdunlap@infradead.org, robin.murphy@arm.com, samuel@sholland.org, suravee.suthikulpanit@amd.com, sven@svenpeter.dev, thierry.reding@gmail.com, tj@kernel.org, tomas.mudrunka@gmail.com, vdumpa@nvidia.com, wens@csie.org, will@kernel.org, yu-cheng.yu@intel.com Subject: Re: [PATCH v3 10/10] iommu: account IOMMU allocated memory In-Reply-To: <20231226200205.562565-11-pasha.tatashin@soleen.com> Message-ID: References: <20231226200205.562565-1-pasha.tatashin@soleen.com> <20231226200205.562565-11-pasha.tatashin@soleen.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Tue, 26 Dec 2023, Pasha Tatashin wrote: > In order to be able to limit the amount of memory that is allocated > by IOMMU subsystem, the memory must be accounted. > > Account IOMMU as part of the secondary pagetables as it was discussed > at LPC. > > The value of SecPageTables now contains mmeory allocation by IOMMU > and KVM. > > Signed-off-by: Pasha Tatashin Acked-by: David Rientjes