lkml.org 
[lkml]   [2021]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/1] ext4: fix lazy initialization next schedule time computation in more granular unit
Date
Description
===========
Ext4 FS has issue on the next schedule time calculation which is based on
the time one request takes to zero out inode table. In the implementations of ext4
lazy initialization, all time related unit is jiffy and also use the current
value of jiffies to calculate time intervals. Around 11 years ago, data from
Lukas that “zeroing one single group takes approx. 28ms without any load”
however with hardware as well as software are getting much upgraded, this number
becomes much smaller today that is even less than 1 jiffy, which makes the calculation
of the next schedule time not accurate and it is reflected on Amazon Linux 2 in
x86_64 and arm64 these two architectures with various HZ values (x86_64: 250, arm64: 100)
that the sleeping time is the same in both arches which is 10 jiffies given the
default multiplier 10, while 10 jiffies are different in these 2 arches in real time
which leads to obvious performance degradation of this ext4lazyinit thread.

Test
====
Tested the patch in stable kernel 5.10 with FS volume 2T and 3T on EC2
x86_64 and arm64 instances. Before the fix, x86_64 instances with HZ value
250 finished the lazy initialization in around 2.4x time less than arm64
instances with HZ value 100. After the fix, both of them finished within
approximately same time. Then changed HZ value in arm64 to 250, no obvious
difference in terms of time was observed.

Patch
=====
Shaoying Xu (1):
ext4: fix lazy initialization next schedule time computation in more
granular unit

fs/ext4/super.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

--
2.16.6

\
 
 \ /
  Last update: 2021-08-18 00:59    [W:0.125 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site