mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nadav Amit <nadav.amit@gmail.com>
To: Chuyi Zhou <zhouchuyi@bytedance.com>
Cc: tglx@kernel.org, mingo@redhat.com, luto@kernel.org,
	peterz@infradead.org, paulmck@kernel.org, muchun.song@linux.dev,
	bp@alien8.de, dave.hansen@linux.intel.com, pbonzini@redhat.com,
	bigeasy@linutronix.de, clrkwllms@kernel.org, rostedt@goodmis.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/5] x86/mm: Allow preemption while waiting for kernel TLB flushes
Date: Mon, 5 Oct 2026 09:50:57 +0300	[thread overview]
Message-ID: <3520FAB5-83C3-4116-BF19-87D66048D993@gmail.com> (raw)
In-Reply-To: <cover.1791179421.git.zhouchuyi@bytedance.com>


> On 5 Oct 2026, at 8:57, Chuyi Zhou <zhouchuyi@bytedance.com> wrote:
> 
> Changes in v2:
>  - Patch 2: Reuse flush_tlb_all() for kernel ranges promoted to a full
>    flush and remove kernel_tlb_flush_all() (Sebastian).
>  - Patch 4: Drop the explicit TLB_FLUSH_ALL check on the end argument.
>    Callers pass actual address ranges and can use flush_tlb_all() for
>    unconditional full flushes (Sebastian).

Chuyi,

It all looks nice and clean, but I am not sure the end result is that
great. I think that instead of consolidating different TLB flush paths,
you break them further apart. Then you try to copy the logic from
userspace TLB flushed into the kernel code (TLB flush counting and such).

I think that perhaps a better path would be to further consolidate the
two instead of separating them. There is functionality that is missing
from kernel-space TLB flushes, and might be needed in the future.

For instance, you can see userspace TLB-flushing has a mechanism to
prevent TLB shootdown storm using TLB generations; and you see it
supports TLB-flushing stride. Now, the shootdown storm might be less
of an issue (for now?) but stride support is something you may want
eventually to support range flush with stride for stuff like [1].

Nadav


[1] https://lore.kernel.org/all/20261005052302.43042-1-lance.yang@linux.dev/

  parent reply	other threads:[~2026-10-05  6:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05  5:57 Chuyi Zhou
2026-10-05  5:57 ` [PATCH v2 1/5] x86/mm: Account for remote kernel TLB flush requests Chuyi Zhou
2026-10-05  5:57 ` [PATCH v2 2/5] x86/mm: Share the full TLB flush dispatch Chuyi Zhou
2026-10-05  5:57 ` [PATCH v2 3/5] x86/mm: Extract the TLB range flush threshold check Chuyi Zhou
2026-10-05  5:57 ` [PATCH v2 4/5] x86/mm: Decouple kernel TLB flushes from flush_tlb_info Chuyi Zhou
2026-10-05  5:57 ` [PATCH v2 5/5] x86/mm: Re-enable preemption before waiting for kernel TLB flushes Chuyi Zhou
2026-10-05  6:50 ` Nadav Amit [this message]
2026-10-05  7:48   ` [PATCH v2 0/5] x86/mm: Allow preemption while " Chuyi Zhou
2026-10-05 16:36     ` Nadav Amit

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=3520FAB5-83C3-4116-BF19-87D66048D993@gmail.com \
    --to=nadav.amit@gmail.com \
    --cc=bigeasy@linutronix.de \
    --cc=bp@alien8.de \
    --cc=clrkwllms@kernel.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=muchun.song@linux.dev \
    --cc=paulmck@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@kernel.org \
    --cc=zhouchuyi@bytedance.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®