[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210817225654.30487-1-shaoyi@amazon.com>
Date: Tue, 17 Aug 2021 22:56:53 +0000
From: Shaoying Xu <shaoyi@...zon.com>
To: <tytso@....edu>, <adilger.kernel@...ger.ca>
CC: <linux-ext4@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<fllinden@...zon.com>, <benh@...zon.com>, <shaoyi@...zon.com>
Subject: [PATCH 0/1] ext4: fix lazy initialization next schedule time computation in more granular unit
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
Powered by blists - more mailing lists