mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Arnd Bergmann <arnd@kernel.org>,
	"Aneesh Kumar K.V (Arm)" <aneesh.kumar@kernel.org>,
	iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: Robin Murphy <robin.murphy@arm.com>,
	Linus Walleij <linusw@kernel.org>,
	Matthew Wilcox <willy@infradead.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>
Subject: Re: [PATCH] dma-direct: Skip cache prep for HighMem coherent allocations
Date: Thu, 8 Jan 2026 11:18:49 +0100	[thread overview]
Message-ID: <75518c48-2d15-4087-bf26-dde223286af7@samsung.com> (raw)
In-Reply-To: <984c3737-3934-49bc-908e-8d67facd68a6@app.fastmail.com>

On 08.01.2026 10:55, Arnd Bergmann wrote:
> On Thu, Jan 8, 2026, at 09:38, Marek Szyprowski wrote:
>> On 02.01.2026 16:51, Aneesh Kumar K.V (Arm) wrote:
>>> dma_direct_alloc() calls arch_dma_prep_coherent() to clean any dirty
>>> cache lines from the kernel linear alias before creating a coherent
>>> remapping.
>>>
>>> HighMem pages have no kernel alias mapping, so there are no alias cache
>>> lines to clean. Skip arch_dma_prep_coherent() for HighMem allocations.
>>>
>>> Signed-off-by: Aneesh Kumar K.V (Arm) <aneesh.kumar@kernel.org>
>> Indeed this is an overhead to call prep for HighMem pages, but on the
>> other hand highmem support is being phased out according to
>> https://lwn.net/ml/all/20251219161559.556737-1-arnd@kernel.org/ Does it
>> make sense to apply this assuming that it will be removed soon?
> I think "soon" is overstating what the plan is. With my proposed
> series, the majority of current highmem users are changed to no
> longer use it by default, but there are still three ways in which
> users will get highmem for a number of years:
>
> - anything with more than 2GB RAM inevitably uses highmem for
>    the top portion of physical memory. These are much less common
>    than 2GB systems, but are not going away soon.
> - systems with sparse physical memory where the first and last page
>    are more than 2GB apart currently still rely on highmem even
>    if the total RAM is 2GB or less. This happens e.g. on Tegra114
>    or RZ-G1H, IIRC. I have plans to address this in the future.
> - Users that have applications using a lot of virtual memory
>    still have the option to go back to old configurations with
>    CONFIG_VMSPLIT_3G by selecting CONFIG_EXPERT.
>
> On the other hand, my proposed change does mean that we have more
> freedom to optimize for the non-highmem case. I think we can
> require that the CMA area is in lowmem, and we can make the use
> of highmem computationally more expensive if it helps simplify code.

Thanks for the summary, I will apply then this patch as a fix for v6.19-rc.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


  reply	other threads:[~2026-01-08 10:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260102155138eucas1p1563e460256561f6974079d3de733e895@eucas1p1.samsung.com>
2026-01-02 15:51 ` Aneesh Kumar K.V (Arm)
2026-01-08  8:38   ` Marek Szyprowski
2026-01-08  9:55     ` Arnd Bergmann
2026-01-08 10:18       ` Marek Szyprowski [this message]
2026-01-08 10:50   ` Robin Murphy
2026-01-08 12:41     ` Marek Szyprowski
2026-01-08 12:59       ` Robin Murphy
2026-01-09  3:15         ` Aneesh Kumar K.V
2026-01-12  9:08           ` Marek Szyprowski
2026-01-12 12:22             ` Aneesh Kumar K.V
2026-01-16 10:29               ` Marek Szyprowski
2026-01-19  4:13                 ` Aneesh Kumar K.V
2026-01-19  9:18                   ` Marek Szyprowski
2026-01-20  9:49                     ` Aneesh Kumar K.V

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=75518c48-2d15-4087-bf26-dde223286af7@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=aneesh.kumar@kernel.org \
    --cc=arnd@kernel.org \
    --cc=iommu@lists.linux.dev \
    --cc=linusw@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=willy@infradead.org \
    /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®