From: Robin Murphy <robin.murphy@arm.com>
To: John Garry <john.g.garry@oracle.com>, joro@8bytes.org
Cc: will@kernel.org, pasha.tatashin@soleen.com,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, rientjes@google.com, yosryahmed@google.com
Subject: Re: [PATCH v3 3/3] iommu/iova: use named kmem_cache for iova magazines
Date: Tue, 6 Feb 2024 11:32:17 +0000 [thread overview]
Message-ID: <0d1f81a8-999e-459d-9e5c-7efff665646e@arm.com> (raw)
In-Reply-To: <83a0aafc-8a9c-48ce-a203-96b901489d41@oracle.com>
On 06/02/2024 11:24 am, John Garry wrote:
> On 05/02/2024 15:32, Robin Murphy wrote:
>> From: Pasha Tatashin <pasha.tatashin@soleen.com>
>>
>> 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.
>
> Those caches could do with a trimming ...
See the discussion on v1 for more details:
https://lore.kernel.org/linux-iommu/20240201193014.2785570-1-tatashin@google.com/
but it seems this really is the idle baseline for lots of CPUs * lots of
domains - if all those devices get going in anger it's likely that
combined iova + iova_magazine usage truly will blow up into gigabytes.
Cheers,
Robin.
>
>>
>> Acked-by: David Rientjes <rientjes@google.com>
>> Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
>> [ rm: adjust to rework of iova_cache_{get,put} ]
>> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
>> ---
>
> FWIW:
> Reviewed-by: John Garry <john.g.garry@oracle.com>
next prev parent reply other threads:[~2024-02-06 11:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 15:32 [PATCH v3 0/3] " Robin Murphy
2024-02-05 15:32 ` [PATCH v3 1/3] iommu/iova: Tidy up iova_cache_get() failure Robin Murphy
2024-02-05 18:15 ` David Rientjes
2024-02-05 18:51 ` Pasha Tatashin
2024-02-06 11:01 ` John Garry
2024-02-06 11:25 ` Robin Murphy
2024-02-07 16:38 ` Jerry Snitselaar
2024-02-05 15:32 ` [PATCH v3 2/3] iommu/iova: Reorganise some code Robin Murphy
2024-02-05 18:17 ` David Rientjes
2024-02-05 18:51 ` Pasha Tatashin
2024-02-06 11:05 ` John Garry
2024-02-07 16:41 ` Jerry Snitselaar
2024-02-05 15:32 ` [PATCH v3 3/3] iommu/iova: use named kmem_cache for iova magazines Robin Murphy
2024-02-06 11:24 ` John Garry
2024-02-06 11:32 ` Robin Murphy [this message]
2024-02-07 16:43 ` Jerry Snitselaar
2024-02-09 10:46 ` [PATCH v3 0/3] " Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0d1f81a8-999e-459d-9e5c-7efff665646e@arm.com \
--to=robin.murphy@arm.com \
--cc=iommu@lists.linux.dev \
--cc=john.g.garry@oracle.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=rientjes@google.com \
--cc=will@kernel.org \
--cc=yosryahmed@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox