From: Gao Xiang <xiang@kernel.org>
To: Li GuiFu <bluce.lee@aliyun.com>
Cc: linux-erofs@lists.ozlabs.org
Subject: Re: [PATCH v2] erofs-utils: use qsort() to sort dir->i_subdirs
Date: Sun, 11 Apr 2021 22:41:03 +0800 [thread overview]
Message-ID: <20210411144047.GA15096@hsiangkao-HP-ZHAN-66-Pro-G1> (raw)
In-Reply-To: <8f0140a5-c738-7890-eff7-eb877a40035d@aliyun.com>
Guifu,
On Sun, Apr 11, 2021 at 10:10:09PM +0800, Li GuiFu via Linux-erofs wrote:
> Hu Weiwen
> It really do a high sort performance increase,
> I have a idea that keeping the erofs_prepare_dir_file() function
> paramter stable, Using a independent function to do dirs sort.
>
I think Weiwen's implementation looks fine to me, if you tend to
not passing nr_subdirs as a cleaner solution, my suggestion would
be:
1) introduce a somewhat erofs_subdirs, which includes
- a list_head for all subdir dentries generated from d_alloc;
- a nr_subdirs count;
2) update erofs_d_alloc to
erofs_d_alloc(struct erofs_subdirs *, const char *);
3) update erofs_prepare_dir_file to
erofs_prepare_dir_file(struct erofs_inode *, struct erofs_subdir *).
Yet I'd like to apply the current solution first since it helps the
dir creation performance. If someone has interest to the solution
above, new cleanup is always welcomed.
Reviewed-by: Gao Xiang <xiang@kernel.org>
Thanks,
Gao Xiang
next prev parent reply other threads:[~2021-04-11 14:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 13:52 [PATCH] erofs-utils: use qsort() to sort dir->i_subdirs Hu Weiwen
2021-04-02 2:12 ` Gao Xiang
2021-04-02 2:17 ` Gao Xiang
2021-04-05 9:38 ` [PATCH v2] " Hu Weiwen
2021-04-05 11:24 ` Gao Xiang
2021-04-11 14:10 ` Li GuiFu via Linux-erofs
2021-04-11 14:41 ` Gao Xiang [this message]
2021-04-11 14:56 ` Li GuiFu via Linux-erofs
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=20210411144047.GA15096@hsiangkao-HP-ZHAN-66-Pro-G1 \
--to=xiang@kernel.org \
--cc=bluce.lee@aliyun.com \
--cc=linux-erofs@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).