Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1204350rdb; Fri, 2 Feb 2024 18:33:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGR0fCBViKW8+H5SPix53Jyv7MgJJGYssS85F20QsW1sthL1xPZ0/9dcY9P+TDOZacqwIOl X-Received: by 2002:a9d:7454:0:b0:6de:b472:5be2 with SMTP id p20-20020a9d7454000000b006deb4725be2mr3642179otk.30.1706927609665; Fri, 02 Feb 2024 18:33:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706927609; cv=pass; d=google.com; s=arc-20160816; b=YBYW6w5c/afS/GCD1CqEm7NomA+1MaayKJSqfQHrM7dzCg/5zpZKEx6albQgVJrDLI TQtbbc9ZZPZ7cvVbH/ZWiQptJQ24SkdQ/zH2jDj9WnxSi62RhYZFYQ6oUS0u5Y8Oqhus BCeqtxjfCreqv/JDpDQkhzNKyaNwbWqc3JUNpteMSx/MGK/zLxiXb8c7Q3qcyeqZVYg2 6p39+EJTSAzk2O5wMYnrZPkPI6/Gs4dPvEh/LXJqkMif0E1NhuAN+N3ZgfoTtYiWd7kZ mM4EI2gU/qv7FrMTPQElj/+wcWRfp5an+uojBKx2Nr8nCrGu9GoSFinQmdbNlE4Wpsvz QLIw== ARC-Message-Signature: i=2; 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=XiG6CHWcYdWsI51hB+FTszglKDybzSu63LtpZjDM7i0=; fh=tGmWZ6rBLK4TVsDKI+j3701UuzgccNY8vQs7uaeJebs=; b=WuD6hMj8Tqw+CJCGBRaYTxix54uMTMVNPs6pgNEbdwi5soS1yqSqgD++xkrHC8/fca soAsALUPuyhmtey6pJQuOkdC30nKOJLoSU37GaG0Y5iRqLyCGRFDfPcm6nFaiIDlUqAi HGz1ItbnpWqNoxQtqFyEWV/E7qPpx0PDTtzbb3uGhK4FAG2Qrj7ySGx3YDSnVgjQRcJO 7dd0p1jjQz55ooAvg6R3EV3Y9MvvFdoUY0cOGCNpvXjuJvyW9oDuzitGnuwRfpSgQZfI yOhO5SMPHKk2nDYs5DUTa4YZ0i3GoAYSMV3fkRP3HhyEZzk7nJxd7J9J+T8hGntXPgOW HzwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=32mR5Qd5; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-50824-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50824-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=1; AJvYcCWTSLTo6hlART1NAgMIvSTou1kXA6iPb1sQYGrhwe2b75+l/qxci11U7yqA0EqCGm0QZr9Fa+BXAYBw/RTYT3Qw2l/OETIut604rAXjNQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id v29-20020a63151d000000b005d692a181d9si2467565pgl.340.2024.02.02.18.33.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 18:33:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50824-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=32mR5Qd5; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-50824-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50824-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D82B8B240E5 for ; Sat, 3 Feb 2024 02:30:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA6FD4695; Sat, 3 Feb 2024 02:30:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="32mR5Qd5" Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 AC5B41FCC for ; Sat, 3 Feb 2024 02:30:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706927423; cv=none; b=rJ/9jiJfes8R/cnt2+8BAvgveqVPA8ljOr3aCVXNZ2hH5Hz2shUBnEXo25/iuNP6yZqORpl88nanIUta5n6qPqCAbuNRtaQ80JFHeQavVPrwtmXnlGmSMKJhc9SwjG9MFWOfdLo6FFAEizrm1ofUcdQiorSym5YQNqatVhISgWo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706927423; c=relaxed/simple; bh=31MALDMSUlwza8Dx/4jdfU0IQzumSFSUtKLVbEOi408=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=gYp6ifBV+84N9Xm3uOCmoldBiclVGCkosYPgR6B1URqqa23odl3darSmCag8NCoUcOAi9j/b0PvEAHZ9BlDgdD9ws0LbY8DlZfb5uh/tATcYlIM/pM9SPU/Rmfwnd7GmBLQVh0ZJ2qsukNYOHu+yJP+9KcpnpSL6Mm28vvq0xiA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=32mR5Qd5; arc=none smtp.client-ip=209.85.214.178 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-f178.google.com with SMTP id d9443c01a7336-1d89f0ab02bso33735ad.1 for ; Fri, 02 Feb 2024 18:30:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1706927421; x=1707532221; 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=XiG6CHWcYdWsI51hB+FTszglKDybzSu63LtpZjDM7i0=; b=32mR5Qd5K4IbmXXr65Gv5dvewTWAXdJ16FTFeTg0fwYXqMXS+inlGm0BfdQN20TfTV zf6yfqIEKEI/9Q/2l+7k1vrAuVKENANxDv0VAB4z3sA4kJbEOsgYpAGuwl6VJIfgNX+U 2jhatu0ygruO0+ePvPy481s8JLhEjuRFR9DJ0aZtzlflGnHXW4lT6jTB2X7HDKLC2Lut v5XV2whbZXQQvzhjUZBrpc6C12jVprcBrN1bAHBndSJGY/2AjMhJoQf2SCJxG/KuCblk Qpn07AE1bDr8Zj8bPfb6ISBI24achdKf+5K7wT1nluOOmfbl0NA+1CrJ2vvCvib+lnEt DdWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706927421; x=1707532221; 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=XiG6CHWcYdWsI51hB+FTszglKDybzSu63LtpZjDM7i0=; b=M+Dgy1/fcDCgTi2WoeWzC8EJsvMuF6eXEw60pET59j9rxMiPuTZB3i6EJBjeCdtRVp OMKmAvrbdPo2NKCrPLs6GO5jP1BEIrgB5+aLDRRE9BovfAxFkYLNS6UAQE0MKVEZZAEk yyp3Tgu8995J0H2HjHemCVgHQQngLujXAJeyU/93XkiqZRvjXGHOkJupeWt46LAqGSSw dil4RfZuXt9/g4oTt1R/FLx9tYOwK3PB7tO8iFFSc1x/wdeisiRfDxmg7sH1dcdOUyuy evUEX3UsFZ+s3ulrBpFmat9RHdpnMGWbm5y2F6EPO9VC0zVIsPN5fZ3YKanSAsVowHME KCCA== X-Gm-Message-State: AOJu0YxDQhv+lyn4xrhDgYkJ/nkHQWQ2KKQWVaikHY6lI+Dg7ICgB3Ck I+dzVRCu5rLqBH46+MbCdqbbv5LFGqtplyWpJbsRJ4aQ2jSM4EBbgL2OFElUUA== X-Received: by 2002:a17:902:fccc:b0:1d9:8e37:56cc with SMTP id mi12-20020a170902fccc00b001d98e3756ccmr24869plb.10.1706927420652; Fri, 02 Feb 2024 18:30:20 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVTJg+AEeBfOkpo/qJURUeu9o91x/nT1ZbAlXanN+fx4CgxYbFsH5DaRxefHDJLKAYgGLQ9IF9TOBbXgio9d1sxnArAMI62kfjIQwVRJFFH1C9Ih6WTB1vIMmmUJuIENK0KKVsZQ4f704yNfhvb8lj6P0i5wwsr5hTBgf/Qp63kzfRV9uhpKaPlEc3BSUA1ANE+aU210RCJmd+3VGAQMclintHIwqZRC6nPSf5y5OBzfg== Received: from [2620:0:1008:15:5706:ac37:6d6d:7587] ([2620:0:1008:15:5706:ac37:6d6d:7587]) by smtp.gmail.com with ESMTPSA id t11-20020a17090ad50b00b0029658c7bd53sm747960pju.5.2024.02.02.18.30.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 18:30:20 -0800 (PST) Date: Fri, 2 Feb 2024 18:30:19 -0800 (PST) From: David Rientjes To: Pasha Tatashin cc: robin.murphy@arm.com, joro@8bytes.org, will@kernel.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, linux-mm@kvack.org, yosryahmed@google.com Subject: Re: [PATCH v2] iommu/iova: use named kmem_cache for iova magazines In-Reply-To: <20240202192820.536408-1-pasha.tatashin@soleen.com> Message-ID: References: <20240202192820.536408-1-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 Fri, 2 Feb 2024, Pasha Tatashin wrote: > The magazine buffers can take gigabytes of kmem memory, dominating all > other allocations. For observability purpose create named slab cache so > the iova magazine memory overhead can be clearly observed. > > With this change: > > > slabtop -o | head > Active / Total Objects (% used) : 869731 / 952904 (91.3%) > Active / Total Slabs (% used) : 103411 / 103974 (99.5%) > Active / Total Caches (% used) : 135 / 211 (64.0%) > Active / Total Size (% used) : 395389.68K / 411430.20K (96.1%) > Minimum / Average / Maximum Object : 0.02K / 0.43K / 8.00K > > OBJS ACTIVE USE OBJ SIZE SLABS OBJ/SLAB CACHE SIZE NAME > 244412 244239 99% 1.00K 61103 4 244412K iommu_iova_magazine > 91636 88343 96% 0.03K 739 124 2956K kmalloc-32 > 75744 74844 98% 0.12K 2367 32 9468K kernfs_node_cache > > On this machine it is now clear that magazine use 242M of kmem memory. > > Signed-off-by: Pasha Tatashin Very impressive! Acked-by: David Rientjes