Re: [PATCH] [WIP] configfs: improve item creation performance

From: Seamus Connor
Date: Thu Oct 12 2023 - 19:59:52 EST


>
> This is subtle. Your patch description of course describes why we are
> partitioning the items and attributes, but that will get lost into the
> memory hole very quickly. Please add a comment.
>

Will do. And thanks for taking a look at the patch.

> Plus, aren't the pinned/not-pinned checks redundant? Can't we avoid the
> extra conditional?
>
>
> ```
> spin_lock(&configfs_dirent_lock);
> list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
> - if ((sd->s_type & CONFIGFS_NOT_PINNED) &&
> - !strcmp(configfs_get_name(sd), dentry->d_name.name)) {

Unfortunately they are not. CONFIGFS_IS_PINNED and CONFIGFS_NOT_PINNED
are asymmetrical. There is the readdir cursor (s_type == 0) that might
be anywhere in the list and should not be treated as a pinned item,
but should also not be treated as an unpinned attribute.

Is there any testing that you could recommend for this change? So far
I've gone through testing of our internal components that depend on
configfs, but I haven't done anything targeted.

Thanks,
Seamus