From: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
To: Heiko Carstens <hca@linux.ibm.com>
Cc: David Hildenbrand <david@redhat.com>,
Luiz Capitulino <luizcap@redhat.com>,
borntraeger@linux.ibm.com, joao.m.martins@oracle.com,
mike.kravetz@oracle.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, linux-s390@vger.kernel.org,
gor@linux.ibm.com, agordeev@linux.ibm.com, osalvador@suse.de,
akpm@linux-foundation.org, aneesh.kumar@kernel.org
Subject: Re: [PATCH v2] s390: fix HugeTLB vmemmap optimization crash
Date: Thu, 30 Oct 2025 15:38:07 +0100 [thread overview]
Message-ID: <20251030153807.0a835fee@thinkpad-T15> (raw)
In-Reply-To: <20251029124953.8393Cc7-hca@linux.ibm.com>
On Wed, 29 Oct 2025 13:49:53 +0100
Heiko Carstens <hca@linux.ibm.com> wrote:
> On Wed, Oct 29, 2025 at 01:15:44PM +0100, David Hildenbrand wrote:
> > BTW, I'm staring at s390x's flush_tlb() function and wonder why that one is
> > defined. I'm sure there is a good reason ;)
>
> Yes, I stumbled across that yesterday evening as well. I think its only
> purpose is that it wants to be deleted :). I just didn't do it yet since I
> don't want to see a merge conflict with this patch.
>
> I also need to check if the only usage of flush_tlb_page(), which is also a
> no-op for s390, in mm/memory.c is not indicating a problem too.
>
> > > Changing active entries without the detour over an invalid entry or using
> > > proper instructions like crdte or cspg is not allowed on s390. This was solved
> > > for other parts that change active entries of the kernel mapping in an
> > > architecture compliant way for s390 (see arch/s390/mm/pageattr.c).
> >
> > Good point. I recall ARM64 has similar break-before-make requirements
> > because they cannot tolerate two different TLB entries (small vs. large) for
> > the same virtual address.
> >
> > And if I rememebr correctly, that's the reason why arm64 does not enable
> > ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP just yet.
>
> Ok, let's wait for Gerald. Maybe there is a non-obvious reason why this works
> anyway.
No, using pmd_populate_kernel() on an active/valid PMD in vmemmap_split_pmd()
should violate the architecture, as you described. So this would not work
with current code, and also should not have worked when I did the change,
or only by chance.
Therefore, we should disable ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP again, for
now. Doing it right would most likely require common code changes and
CRDTE / CSPG usage on s390. Not sure if this feature is really worth the
hassle, reading all the drawbacks that I mentioned in my commit 00a34d5a99c0
("s390: select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP").
next prev parent reply other threads:[~2025-10-30 14:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 21:15 [PATCH v2] s390: fix HugeTLB vmemmap optimization crash Luiz Capitulino
2025-10-28 21:53 ` Andrew Morton
2025-10-30 14:59 ` Heiko Carstens
2025-10-29 6:36 ` Alexander Gordeev
2025-10-29 9:57 ` David Hildenbrand
2025-10-29 10:44 ` Heiko Carstens
2025-10-29 12:15 ` David Hildenbrand
2025-10-29 12:49 ` Heiko Carstens
2025-10-30 14:38 ` Gerald Schaefer [this message]
2025-10-30 14:54 ` Luiz Capitulino
2025-10-30 14:56 ` Heiko Carstens
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=20251030153807.0a835fee@thinkpad-T15 \
--to=gerald.schaefer@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@kernel.org \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=joao.m.martins@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=luizcap@redhat.com \
--cc=mike.kravetz@oracle.com \
--cc=osalvador@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.