From: "Darrick J. Wong" <djwong@kernel.org>
To: Lukas Herbolt <lukas@herbolt.com>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-xfs@vger.kernel.org, cem@kernel.org
Subject: Re: [PATCH] xfs: Use xarray to track SB UUIDs instead of plain array.
Date: Mon, 2 Feb 2026 10:50:13 -0800 [thread overview]
Message-ID: <20260202185013.GH7712@frogsfrogsfrogs> (raw)
In-Reply-To: <698e4433ee0b01978deed124792c7e57@herbolt.com>
On Mon, Feb 02, 2026 at 10:37:23AM +0100, Lukas Herbolt wrote:
> On 2026-02-02 08:31, Christoph Hellwig wrote:
> > On Fri, Jan 30, 2026 at 08:55:34AM -0800, Darrick J. Wong wrote:
> > > > + xa_erase(&xfs_uuid_table, index);
> > > > + }
> > >
> > > Why not store the xarray index in the xfs_mount so you can delete the
> > > entry directly without having to walk the entire array?
> >
> > Yeah, that makes a lot of sense.
> >
> I did not want to touch the xfs_mount but if there is no objection against,
> I will add the index there.
>
> > > And while I'm on about it ... if you're going to change data
> > > structures,
> > > why not use rhashtable or something that can do a direct lookup?
> >
> > rhashtables require quite a bit of boilerplate. Probably not worth
> > if for a single lookup in a relatively small colletion once per
> > mount. But yeah, if only we had a data structure that allows
> > directly lookups without all that boilerplate..
>
> I do not have strong preference here.
<shrug> Since the original message said "krealloc prints out warning if
allocation is bigger than 2x PAGE_SIZE", I figured that meant you were
trying to mount more than (2 * 4096) / 16 == 512 different xfs
filesystems on the same host.
I don't have a particular problem with the array search and large memory
allocation since I never mount that many filesystems, but you would
appear to be the first user to complain about a scaling limit there...
:)
--D
> --
> -lhe
>
next prev parent reply other threads:[~2026-02-02 18:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-30 15:42 [PATCH 0/1] xfs: Use xarray to track SB UUIDs instead of plain array Lukas Herbolt
2026-01-30 15:42 ` [PATCH] " Lukas Herbolt
2026-01-30 16:55 ` Darrick J. Wong
2026-02-02 7:31 ` Christoph Hellwig
2026-02-02 9:37 ` Lukas Herbolt
2026-02-02 18:50 ` Darrick J. Wong [this message]
2026-02-03 5:17 ` Christoph Hellwig
2026-02-03 7:23 ` Darrick J. Wong
2026-02-02 7:37 ` Christoph Hellwig
2026-02-02 9:38 ` Lukas Herbolt
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=20260202185013.GH7712@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=cem@kernel.org \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
--cc=lukas@herbolt.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