From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Alexander Krabler <Alexander.Krabler@kuka.com>,
Hugh Dickins <hughd@google.com>,
Frank van der Linden <fvdl@google.com>,
Mike Galbraith <efault@gmx.de>,
"linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Dennis Schimmel <Dennis.Schimmel@kuka.com>,
Daniel Braunwarth <Daniel.Braunwarth@kuka.com>
Subject: Re: Realtime threads delayed due to kcompactd0
Date: Wed, 20 Aug 2025 16:29:19 +0200 [thread overview]
Message-ID: <20250820142919.HTybedrl@linutronix.de> (raw)
In-Reply-To: <c5bd00d6-e6ca-48fd-a11e-c90fa9c50e05@suse.cz>
On 2025-08-08 09:37:26 [+0200], Vlastimil Babka wrote:
> > Given the information I got from here, the comment on the code [1]
> > and an older commit message [2], I suspect CMA somehow influences our problem.
>
> However, kcompactd doesn't perform CMA allocations, only compaction, in a
> mode that does not include ISOLATE_UNEVICTABLE. So this is weird.
As per smaps, the RT task should have all VMAs listed as "lo". If use
mlock() then something like an accidental fork() would remove it.
Otherwise it should be there.
At the time of the fault you could add something like
| diff --git a/mm/memory.c b/mm/memory.c
| --- a/mm/memory.c
| +++ b/mm/memory.c
| @@ -4476,6 +4476,12 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
| entry = pte_to_swp_entry(vmf->orig_pte);
| if (unlikely(non_swap_entry(entry))) {
| if (is_migration_entry(entry)) {
| +
| + if (!strcmp("tRealtime", current->comm)) {
| + trace_printk("Migrated: 0x%lx VMA flags: %lx\n",
| + vmf->address, vma->vm_flags);
| + }
| +
| migration_entry_wait(vma->vm_mm, vmf->pmd,
| vmf->address);
| } else if (is_device_exclusive_entry(entry)) {
to see address is gone. Not sure if the PTE flags are of any help here.
Is it easily possible on the other side (isolate_migratepages(), right?)
to figure out which task a certain address space/ page belongs to? So
would if a "bad" page is considered for migration.
Sebastian
next prev parent reply other threads:[~2025-08-20 14:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-25 5:30 Realtime threads delayed due to kcompactd0 Alexander Krabler
2025-07-31 18:34 ` Frank van der Linden
2025-07-31 18:41 ` Vlastimil Babka
2025-08-01 2:46 ` Mike Galbraith
2025-08-01 9:58 ` Vlastimil Babka
2025-08-01 11:23 ` Alexander Krabler
2025-08-01 12:57 ` Vlastimil Babka
2025-08-01 13:40 ` Alexander Krabler
2025-08-07 10:48 ` Vlastimil Babka
2025-08-07 12:21 ` Hugh Dickins
2025-08-07 15:49 ` Alexander Krabler
2025-08-08 7:37 ` Vlastimil Babka
2025-08-20 14:29 ` Sebastian Andrzej Siewior [this message]
2025-08-01 19:27 ` Frank van der Linden
2025-08-05 14:11 ` Alexander Krabler
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=20250820142919.HTybedrl@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=Alexander.Krabler@kuka.com \
--cc=Daniel.Braunwarth@kuka.com \
--cc=Dennis.Schimmel@kuka.com \
--cc=efault@gmx.de \
--cc=fvdl@google.com \
--cc=hughd@google.com \
--cc=linux-mm@kvack.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=vbabka@suse.cz \
/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;
as well as URLs for NNTP newsgroup(s).