]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'rk/inode_lock' into dev
authorTheodore Ts'o <tytso@mit.edu>
Thu, 26 Dec 2019 14:57:24 +0000 (09:57 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 26 Dec 2019 15:02:07 +0000 (10:02 -0500)
commite811cd74c12a0342d870888d1d05142b188dc73f
tree29469bda486d696a657bca42ad6cb43922958b26
parent5fed3cce123f10dfa0ced7a9864a2bc2a8c16ad4
parent8a24d57cbbf0162fda888689bafa5e26d260c9f1
Merge branch 'rk/inode_lock' into dev

These are ilock patches which helps improve the current inode lock scalabiliy
problem in ext4 DIO mixed read/write workload case. The problem was first
reported by Joseph [1]. This should help improve mixed read/write workload
cases for databases which use directIO.

These patches are based upon upstream discussion with Jan Kara & Joseph [2].

The problem really is that in case of DIO overwrites, we start with
a exclusive lock and then downgrade it later to shared lock. This causes a
scalability problem in case of mixed DIO read/write workload case.
i.e. if we have any ongoing DIO reads and then comes a DIO writes,
(since writes starts with excl. inode lock) then it has to wait until the
shared lock is released (which only happens when DIO read is completed).
Same is true for vice versa as well.
The same can be easily observed with perf-tools trace analysis [3].

For more details, including performance numbers, please see [4].

[1] https://lore.kernel.org/linux-ext4/1566871552-60946-4-git-send-email-joseph.qi@linux.alibaba.com/
[2] https://lore.kernel.org/linux-ext4/20190910215720.GA7561@quack2.suse.cz/
[3] https://raw.githubusercontent.com/riteshharjani/LinuxStudy/master/ext4/perf.report
[4] https://lore.kernel.org/r/20191212055557.11151-1-riteshh@linux.ibm.com