summaryrefslogtreecommitdiffstats
path: root/fs/exfat/exfat_fs.h
diff options
context:
space:
mode:
authorYuezhang Mo <Yuezhang.Mo@sony.com>2022-11-07 17:22:13 +0900
committerNamjae Jeon <linkinjeon@kernel.org>2022-12-12 11:02:48 +0900
commite298c8a818a3e517582e60c412f4a41b3a1647c5 (patch)
treee16206d6b14cf1c291aeadce894cf97fc8ed5cfc /fs/exfat/exfat_fs.h
parentff39899be80b9d90d5e13775eb9fd150338b6e15 (diff)
downloadlinux-stable-e298c8a818a3e517582e60c412f4a41b3a1647c5.tar.gz
linux-stable-e298c8a818a3e517582e60c412f4a41b3a1647c5.tar.bz2
linux-stable-e298c8a818a3e517582e60c412f4a41b3a1647c5.zip
exfat: hint the empty entry which at the end of cluster chain
After traversing all directory entries, hint the empty directory entry no matter whether or not there are enough empty directory entries. After this commit, hint the empty directory entries like this: 1. Hint the deleted directory entries if enough; 2. Hint the deleted and unused directory entries which at the end of the cluster chain no matter whether enough or not(Add by this commit); 3. If no any empty directory entries, hint the empty directory entries in the new cluster(Add by this commit). This avoids repeated traversal of directory entries, reduces CPU usage, and improves the performance of creating files and directories(especially on low-performance CPUs). Test create 5000 files in a class 4 SD card on imx6q-sabrelite with: for ((i=0;i<5;i++)); do sync time (for ((j=1;j<=1000;j++)); do touch file$((i*1000+j)); done) done The more files, the more performance improvements. Before After Improvement 1~1000 25.360s 22.168s 14.40% 1001~2000 38.242s 28.72ss 33.15% 2001~3000 49.134s 35.037s 40.23% 3001~4000 62.042s 41.624s 49.05% 4001~5000 73.629s 46.772s 57.42% Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com> Reviewed-by: Andy Wu <Andy.Wu@sony.com> Reviewed-by: Aoyama Wataru <wataru.aoyama@sony.com> Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'fs/exfat/exfat_fs.h')
0 files changed, 0 insertions, 0 deletions