From: Dave Chinner <david@fromorbit.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: linux-xfs@vger.kernel.org, linux-mm@kvack.org
Subject: Re:
Date: Mon, 22 Jan 2024 22:53:36 +1100 [thread overview]
Message-ID: <Za5XQDOutk93L5w1@dread.disaster.area> (raw)
In-Reply-To: <87zfwxk75o.fsf@linux.intel.com>
On Mon, Jan 22, 2024 at 02:13:23AM -0800, Andi Kleen wrote:
> Dave Chinner <david@fromorbit.com> writes:
>
> > Thoughts, comments, etc?
>
> The interesting part is if it will cause additional tail latencies
> allocating under fragmentation with direct reclaim, compaction
> etc. being triggered before it falls back to the base page path.
It's not like I don't know these problems exist with memory
allocation. Go have a look at xlog_kvmalloc() which is an open coded
kvmalloc() that allows the high order kmalloc allocations to
fail-fast without triggering all the expensive and unnecessary
direct reclaim overhead (e.g. compaction!) because we can fall back
to vmalloc without huge concerns. When high order allocations start
to fail, then we fall back to vmalloc and then we hit the long
standing vmalloc scalability problems before anything else in XFS or
the IO path becomes a bottleneck.
IOWs, we already know that fail-fast high-order allocation is a more
efficient and effective fast path than using vmalloc/vmap_ram() all
the time. As this is an RFC, I haven't implemented stuff like this
yet - I haven't seen anything in the profiles indicating that high
order folio allocation is failing and causing lots of reclaim
overhead, so I simply haven't added fail-fast behaviour yet...
> In fact it is highly likely it will, the question is just how bad it is.
>
> Unfortunately benchmarking for that isn't that easy, it needs artificial
> memory fragmentation and then some high stress workload, and then
> instrumenting the transactions for individual latencies.
I stress test and measure XFS metadata performance under sustained
memory pressure all the time. This change has not caused any
obvious regressions in the short time I've been testing it.
I still need to do perf testing on large directory block sizes. That
is where high-order allocations will get stressed - that's where
xlog_kvmalloc() starts dominating the profiles as it trips over
vmalloc scalability issues...
> I would in any case add a tunable for it in case people run into this.
No tunables. It either works or it doesn't. If we can't make
it work reliably by default, we throw it in the dumpster, light it
on fire and walk away.
> Tail latencies are a common concern on many IO workloads.
Yes, for user data operations it's a common concern. For metadata,
not so much - there's so many far worse long tail latencies in
metadata operations (like waiting for journal space) that memory
allocation latencies in the metadata IO path are largely noise....
-Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2024-01-22 11:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 22:19 [RFC] [PATCH 0/3] xfs: use large folios for buffers Dave Chinner
2024-01-18 22:19 ` [PATCH 1/3] xfs: unmapped buffer item size straddling mismatch Dave Chinner
2024-01-22 6:41 ` Christoph Hellwig
2024-01-18 22:19 ` [PATCH 2/3] xfs: use folios in the buffer cache Dave Chinner
2024-01-19 1:26 ` Darrick J. Wong
2024-01-19 7:03 ` Dave Chinner
2024-01-22 6:39 ` Christoph Hellwig
2024-01-22 12:05 ` Dave Chinner
2024-01-22 13:18 ` Christoph Hellwig
2024-01-22 21:10 ` Dave Chinner
2024-01-18 22:19 ` [PATCH 3/3] xfs: convert buffer cache to use high order folios Dave Chinner
2024-01-19 1:31 ` Darrick J. Wong
2024-01-19 7:12 ` Dave Chinner
2024-01-22 6:45 ` Christoph Hellwig
2024-01-22 11:57 ` Dave Chinner
2024-01-19 1:05 ` [RFC] [PATCH 0/3] xfs: use large folios for buffers Darrick J. Wong
2024-01-22 10:13 ` Andi Kleen
2024-01-22 11:53 ` Dave Chinner [this message]
2024-01-22 13:34 ` Using Folios for XFS metadata Andi Kleen
2024-01-23 0:19 ` Dave Chinner
[not found] <CAKEZqKKdQ9EhRobSmq0sV76arfpk6m5XqA-=XQP_M3VRG=M-eg@mail.gmail.com>
2023-06-08 8:13 ` chenlei0x
-- strict thread matches above, loose matches on Subject: below --
2019-10-27 21:47 Re: Margaret Kwan Wing Han
2019-02-16 0:08 Re: Graham Loan Firm
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=Za5XQDOutk93L5w1@dread.disaster.area \
--to=david@fromorbit.com \
--cc=ak@linux.intel.com \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.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