mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Timber <dxdt@dev.snart.me>
To: Chi Zhiling <chizhiling@163.com>,
	exfat@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: Namjae Jeon <linkinjeon@kernel.org>,
	Sungjong Seo <sj1557.seo@samsung.com>,
	Yuezhang Mo <yuezhang.mo@sony.com>,
	Chi Zhiling <chizhiling@kylinos.cn>
Subject: Re: [PATCH 2/2] exfat: take bitmap_lock at the start of exfat_alloc_cluster()
Date: Tue, 8 Sep 2026 00:53:57 +0000	[thread overview]
Message-ID: <147c3770-bc3e-446c-8bc2-352418aeb1ea@dev.snart.me> (raw)
In-Reply-To: <6d6c01f9-4cc2-4e63-a765-f735452e7eab@163.com>

On 9/7/26 08:04, Chi Zhiling wrote:
[...]
>
> You mean one user has changed the fs, and others see the stale value
> of used_clusters?
>
> For SMP (including NUMA), if a certain CPU changes the value of
> used_clusters, then the caches of all other CPUs will be invalidated
> and need to be refilled. This process is completed by the hardware,
> see MESI protocol.
My bad for taking NUMA as an example. I was just curious as to what you
might have to say on this since the fix is kinda related to your patch.

I was just pointing out that there's a minor race condition in
exfat_statfs(). I used NUMA as an example because the delay through the
interconnect would make the cache coherency problem worse. btw, I think
the MESI protocol only covers cache. It has no control over the
execution flow of processors.

I might have an access to a real NUMA hardware that I can test my
reproducer on. I'll report back with a patch if I can actually reproduce
it. Thanks anyways.

Davo

  reply	other threads:[~2026-09-08  0:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-05  5:49 [PATCH 0/2] exfat: fix cluster allocation accounting and locking Chi Zhiling
2026-09-05  5:49 ` [PATCH 1/2] exfat: fix used_clusters accounting during cluster allocation Chi Zhiling
2026-09-05  5:49 ` [PATCH 2/2] exfat: take bitmap_lock at the start of exfat_alloc_cluster() Chi Zhiling
2026-09-07  3:21   ` David Timber
2026-09-07  8:04     ` Chi Zhiling
2026-09-08  0:53       ` David Timber [this message]
2026-09-05  9:33 ` [PATCH 0/2] exfat: fix cluster allocation accounting and locking Namjae Jeon

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=147c3770-bc3e-446c-8bc2-352418aeb1ea@dev.snart.me \
    --to=dxdt@dev.snart.me \
    --cc=chizhiling@163.com \
    --cc=chizhiling@kylinos.cn \
    --cc=exfat@lists.linux.dev \
    --cc=linkinjeon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sj1557.seo@samsung.com \
    --cc=yuezhang.mo@sony.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®