From: Rik van Riel <riel@surriel.com>
To: Aaron Tomlin <atomlin@atomlin.com>, Dave Hansen <dave.hansen@intel.com>
Cc: "David Hildenbrand (Red Hat)" <david@kernel.org>,
oleg@redhat.com, akpm@linux-foundation.org,
gregkh@linuxfoundation.org, brauner@kernel.org,
mingo@kernel.org, neelx@suse.com, sean@ashe.io,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Dave Hansen <dave.hansen@linux.intel.com>,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
"x86@kernel.org" <x86@kernel.org>
Subject: Re: [v3 PATCH 1/1] fs/proc: Expose mm_cpumask in /proc/[pid]/status
Date: Thu, 15 Jan 2026 21:27:44 -0500 [thread overview]
Message-ID: <2cab00c18ed7499e5ef143c7f3198c61d56ede25.camel@surriel.com> (raw)
In-Reply-To: <zkl42ttlzuyidy2ner5sjfbg5b62l5mcmlcmardd534y2p2u2q@vz2w4nbwvbhf>
On Thu, 2026-01-15 at 20:53 -0500, Aaron Tomlin wrote:
>
> Based on my reading of arch/x86/mm/tlb.c, the lifecycle of each bit
> in
> mm_cpumask appears to follow this logic:
>
> 1. Schedule on (switch_mm): Bit set.
> 2. Schedule off: Bit remains set (CPU enters "Lazy" mode).
> 3. Remote TLB Flush (IPI):
> - If Running: Flush TLB, bit remains set.
> - If lazy (leave_mm): Switch to init_mm, bit clearing is
> deferred.
> - If stale (mm != loaded_mm): bit is cleared immediately
> (effectively the second IPI for a CPU that was previously
> lazy).
>
You're close. When a process uses INVLPGB, no remote TLB
flushing IPIs will get sent, and CPUs never get cleared
from the mm_cpumask.
--
All Rights Reversed.
next prev parent reply other threads:[~2026-01-16 2:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 20:54 [v3 PATCH 0/1] fs/proc: Expose mm_cpumask in /proc/[pid]/status Aaron Tomlin
2026-01-15 20:54 ` [v3 PATCH 1/1] " Aaron Tomlin
2026-01-15 21:19 ` David Hildenbrand (Red Hat)
2026-01-15 21:23 ` Peter Zijlstra
2026-01-15 21:39 ` Dave Hansen
2026-01-16 1:53 ` Aaron Tomlin
2026-01-16 2:27 ` Rik van Riel [this message]
2026-01-16 14:31 ` Aaron Tomlin
2026-01-16 5:08 ` Dave Hansen
2026-01-16 15:42 ` Aaron Tomlin
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=2cab00c18ed7499e5ef143c7f3198c61d56ede25.camel@surriel.com \
--to=riel@surriel.com \
--cc=akpm@linux-foundation.org \
--cc=atomlin@atomlin.com \
--cc=brauner@kernel.org \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=david@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=neelx@suse.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=sean@ashe.io \
--cc=x86@kernel.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