mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kohei Enju <enju.kohei@fujitsu.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@kernel.org>
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
	 Robin Murphy <robin.murphy@arm.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH v6 6/8] dma: swiotlb: Centralize memory-encryption pool sizing
Date: Fri, 27 Nov 2026 17:32:47 +0900	[thread overview]
Message-ID: <awk97nvn_HKgONmF@FCCLS0092175.localdomain> (raw)
In-Reply-To: <yq5a33t6qrvc.fsf@kernel.org>

On 11/12 15:43, Aneesh Kumar K.V wrote:
> Kohei Enju <enju.kohei@fujitsu.com> writes:
> 
> > Hi Aneesh,
> >
> > On 11/01 09:47, Aneesh Kumar K.V wrote:
> > [...]
> >> >
> >> > Hi Aneesh,
> >> >
> 
>  [ ... 35 lines skipped ... ] 
> 
> > Overall, I would prefer the dynamic sizing approach. However, I believe
> > the initial pool size still matters.
> >
> > Also, as Catalin pointed out earlier in the following message:
> >
> >     https://lore.kernel.org/all/ann6noRzoPLL9kDY@arm.com/
> >
> > the arm64 adjustment also reduces the target size used for dynamic
> > pool allocation, since both the initial pool and dynamic allocation
> > currently use default_nslabs.
> >
> > I am testing the patch below to decouple the initial pool size from the
> > dynamic allocation target. It adds swiotlb_adjust_initial_size() for
> > callers that only want to reduce the initial allocation, while keeping
> > the existing swiotlb_adjust_size() semantics for callers that want to
> > adjust both sizes.
> >
> 
> Should we instead update the logic so that reducing the swiotlb size
> leaves the dynamic allocation size unchanged, while increasing it also
> bumps the dynamic allocation size?

Sorry for the late response.

That makes sense for the arm64 and RISC-V cases. However, for
plat_swiotlb_setup() in arch/mips/cavium-octeon/dma-octeon.c, I'm not
sure whether we also want to preserve the dynamic allocation target when
reducing the initial pool size.

Do we want that change on Octeon too? If not, I'd prefer a separate API
so that we can preserve the existing behavior and explicitly update only
the callers that need to reduce the initial pool size independently of
the dynamic allocation target.

Thanks,
Kohei

  reply	other threads:[~2026-11-27  8:32 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260924060823eucas1p1d27fbf57221c9b4c0e9831a9b0cdd7d3@eucas1p1.samsung.com>
2026-09-24  6:07 ` [PATCH v6 0/8] dma: swiotlb: Centralize default pool policy and sizing Aneesh Kumar K.V (Arm)
2026-09-24  6:07   ` [PATCH v6 1/8] dma: swiotlb: Rename swiotlb_size_or_default() Aneesh Kumar K.V (Arm)
2026-09-24  6:07   ` [PATCH v6 2/8] dma: swiotlb: Consolidate slab rounding Aneesh Kumar K.V (Arm)
2026-09-24  6:07   ` [PATCH v6 3/8] dma: swiotlb: Track whether the pool size was explicitly set Aneesh Kumar K.V (Arm)
2026-09-24  6:07   ` [PATCH v6 4/8] dma: swiotlb: Centralize default pool policy selection Aneesh Kumar K.V (Arm)
2026-09-24  6:07   ` [PATCH v6 5/8] dma: swiotlb: Centralize minimal pool sizing Aneesh Kumar K.V (Arm)
2026-09-24  6:07   ` [PATCH v6 6/8] dma: swiotlb: Centralize memory-encryption " Aneesh Kumar K.V (Arm)
2026-10-06 21:49     ` Will Deacon
2026-10-07 10:04       ` Catalin Marinas
2026-10-07 10:43         ` Will Deacon
2026-10-07 11:13           ` Catalin Marinas
2026-10-07 12:15           ` Aneesh Kumar K.V
2026-10-08  5:33             ` Aneesh Kumar K.V
2026-10-08 12:51               ` Catalin Marinas
2026-10-08 14:32                 ` Aneesh Kumar K.V
2026-10-08 15:32                   ` Marek Szyprowski
2026-10-09 10:18                     ` Will Deacon
2026-10-30 10:50                   ` Kohei Enju
2026-11-01  4:17                     ` Aneesh Kumar K.V
2026-11-11 11:53                       ` Kohei Enju
2026-11-12 10:13                         ` Aneesh Kumar K.V
2026-11-27  8:32                           ` Kohei Enju [this message]
2026-10-08 10:05           ` Marek Szyprowski
2026-10-08 11:42             ` Aneesh Kumar K.V
2026-10-07 12:17         ` Aneesh Kumar K.V
2026-09-24  6:07   ` [PATCH v6 7/8] dma: swiotlb: Add an overridable architecture pool opt-out Aneesh Kumar K.V (Arm)
2026-09-24  6:07   ` [PATCH v6 8/8] dma: swiotlb: Remove SWIOTLB_ANY Aneesh Kumar K.V (Arm)
2026-09-25  8:57   ` [PATCH v6 0/8] dma: swiotlb: Centralize default pool policy and sizing Marek Szyprowski
2026-10-06 21:42   ` Marek Szyprowski
2026-10-06 21:52     ` Will Deacon

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=awk97nvn_HKgONmF@FCCLS0092175.localdomain \
    --to=enju.kohei@fujitsu.com \
    --cc=aneesh.kumar@kernel.org \
    --cc=iommu@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=robin.murphy@arm.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

all inboxes | Powered by JetHome®