[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZdFlPbvexMir0WZO@xsang-OptiPlex-9020>
Date: Sun, 18 Feb 2024 10:02:37 +0800
From: Oliver Sang <oliver.sang@...el.com>
To: Chuck Lever <chuck.lever@...cle.com>
CC: Jan Kara <jack@...e.cz>, Chuck Lever <cel@...nel.org>,
<viro@...iv.linux.org.uk>, <brauner@...nel.org>, <hughd@...gle.com>,
<akpm@...ux-foundation.org>, <Liam.Howlett@...cle.com>,
<feng.tang@...el.com>, <linux-kernel@...r.kernel.org>,
<linux-fsdevel@...r.kernel.org>, <maple-tree@...ts.infradead.org>,
<linux-mm@...ck.org>, <lkp@...el.com>, <oliver.sang@...el.com>
Subject: Re: [PATCH RFC 6/7] libfs: Convert simple directory offsets to use a
Maple Tree
hi, Chuck Lever,
On Thu, Feb 15, 2024 at 08:45:33AM -0500, Chuck Lever wrote:
> On Thu, Feb 15, 2024 at 02:06:01PM +0100, Jan Kara wrote:
> > On Tue 13-02-24 16:38:01, Chuck Lever wrote:
> > > From: Chuck Lever <chuck.lever@...cle.com>
> > >
> > > Test robot reports:
> > > > kernel test robot noticed a -19.0% regression of aim9.disk_src.ops_per_sec on:
> > > >
> > > > commit: a2e459555c5f9da3e619b7e47a63f98574dc75f1 ("shmem: stable directory offsets")
> > > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
> > >
> > > Feng Tang further clarifies that:
> > > > ... the new simple_offset_add()
> > > > called by shmem_mknod() brings extra cost related with slab,
> > > > specifically the 'radix_tree_node', which cause the regression.
> > >
> > > Willy's analysis is that, over time, the test workload causes
> > > xa_alloc_cyclic() to fragment the underlying SLAB cache.
> > >
> > > This patch replaces the offset_ctx's xarray with a Maple Tree in the
> > > hope that Maple Tree's dense node mode will handle this scenario
> > > more scalably.
> > >
> > > In addition, we can widen the directory offset to an unsigned long
> > > everywhere.
> > >
> > > Suggested-by: Matthew Wilcox <willy@...radead.org>
> > > Reported-by: kernel test robot <oliver.sang@...el.com>
> > > Closes: https://lore.kernel.org/oe-lkp/202309081306.3ecb3734-oliver.sang@intel.com
> > > Signed-off-by: Chuck Lever <chuck.lever@...cle.com>
> >
> > OK, but this will need the performance numbers.
>
> Yes, I totally concur. The point of this posting was to get some
> early review and start the ball rolling.
>
> Actually we expect roughly the same performance numbers now. "Dense
> node" support in Maple Tree is supposed to be the real win, but
> I'm not sure it's ready yet.
>
>
> > Otherwise we have no idea
> > whether this is worth it or not. Maybe you can ask Oliver Sang? Usually
> > 0-day guys are quite helpful.
>
> Oliver and Feng were copied on this series.
we are in holidays last week, now we are back.
I noticed there is v2 for this patch set
https://lore.kernel.org/all/170820145616.6328.12620992971699079156.stgit@91.116.238.104.host.secureserver.net/
and you also put it in a branch:
https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git
"simple-offset-maple" branch.
we will test aim9 performance based on this branch. Thanks
>
>
> > > @@ -330,9 +329,9 @@ int simple_offset_empty(struct dentry *dentry)
> > > if (!inode || !S_ISDIR(inode->i_mode))
> > > return ret;
> > >
> > > - index = 2;
> > > + index = DIR_OFFSET_MIN;
> >
> > This bit should go into the simple_offset_empty() patch...
> >
> > > @@ -434,15 +433,15 @@ static loff_t offset_dir_llseek(struct file *file, loff_t offset, int whence)
> > >
> > > /* In this case, ->private_data is protected by f_pos_lock */
> > > file->private_data = NULL;
> > > - return vfs_setpos(file, offset, U32_MAX);
> > > + return vfs_setpos(file, offset, MAX_LFS_FILESIZE);
> > ^^^
> > Why this? It is ULONG_MAX << PAGE_SHIFT on 32-bit so that doesn't seem
> > quite right? Why not use ULONG_MAX here directly?
>
> I initially changed U32_MAX to ULONG_MAX, but for some reason, the
> length checking in vfs_setpos() fails. There is probably a sign
> extension thing happening here that I don't understand.
>
>
> > Otherwise the patch looks good to me.
>
> As always, thank you for your review.
>
>
> --
> Chuck Lever
Powered by blists - more mailing lists