All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <dgc@kernel.org>
To: Vitali Lovich <vlovich@gmail.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: Really bad I/O lock contention between non-overlapping reader and writer
Date: Fri, 16 Oct 2026 12:06:54 +1100	[thread overview]
Message-ID: <atF4rrzDigoX0Zyv@dread> (raw)
In-Reply-To: <CAF8PYMhk202oMMNAdT0yPDD=J8rG5kgKVRSRnf5ix+x6_SJmYQ@mail.gmail.com>

On Wed, Oct 14, 2026 at 04:10:30PM -0700, Vitali Lovich wrote:
> Ok. I have a patch series I'm happy to share. It has no meaningful
> performance degradation / scaling problems and largely fixes the
> head-of-line blocking problem without the challenges of range
> tracking. Before I post it, some stylistic questions for you:
> 
> * Do you prefer it as a new RFC e-mail chain or continue here

New patch series.

> * Are there specific benchmarks / workloads you'd like me to gather numbers?

FIO exercising random rw 4kB DIO at differing levels of concurrency
is the minimum.

> * Is a VM with RAM XFS filesystem sufficient or is raw metal w/ an
> NVMe drive required?

I'd typically test this on a machine with 32+ CPU cores and an IO
subsystem that can sustain >2 million random 4kB writes
indefinitely. I'd then use fio using pre-written files to hit it
with increasing IO concurrency to the same file with either io_uring
or AIO with direct IO to exercise shared access scalability.

And I'd do this with both the current code (rwsem) and whatever new
locking technique I am testing. The key point here is having enough
CPU cores in the machine to demonstrate the effect of contention on
shared structures.

I also wrote a bunch of micro-benchmarks to stress overlapping IO to
ensure that exclusion occurred correctly, as well as to test
scalability when overlapping range operations are occurring. e.g.
what happens when you have lots of IO in progress, and you do an
operation that needs exclusive access to the entire file (e.g.
FICLONE on an active file).

i.e. demonstration of worst case behaviour is needed because that is
often more important than best case benchmarketing numbers.

-Dave.
-- 
Dave Chinner
dgc@kernel.org

  reply	other threads:[~2026-10-16  1:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12 17:47 Really bad I/O lock contention between non-overlapping reader and writer Vitali Lovich
2026-10-12 18:23 ` Vitali Lovich
2026-10-12 19:37 ` Alan Huang
2026-10-12 19:53   ` Vitali Lovich
2026-10-12 20:27     ` Alan Huang
2026-10-12 20:47 ` Dave Chinner
2026-10-13 23:49   ` Vitali Lovich
2026-10-14  3:01     ` Dave Chinner
2026-10-14 23:10       ` Vitali Lovich
2026-10-16  1:06         ` Dave Chinner [this message]
2026-10-16  1:20           ` Dave Chinner
     [not found]   ` <CAF8PYMi5DX0AkzbSTFnCchHnr3QeB-S7J+2FNMCqB8zrtR9ojA@mail.gmail.com>
2026-10-14  2:34     ` Dave Chinner

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=atF4rrzDigoX0Zyv@dread \
    --to=dgc@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=vlovich@gmail.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 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.