Whamcloud - gitweb
LU-17078 ldlm: do not spin up thread for local cancels 92/52192/5
authorPatrick Farrell <pfarrell@whamcloud.com>
Thu, 31 Aug 2023 00:07:03 +0000 (20:07 -0400)
committerOleg Drokin <green@whamcloud.com>
Sun, 4 Feb 2024 08:27:36 +0000 (08:27 +0000)
commit291ac6e6925e3bdf31f527de2bedf5f19706b230
treecd5cd3373f3d29af6181c3b677815da5557886b6
parent7071a48d341054d0b001f6d9ec98a518aae69452
LU-17078 ldlm: do not spin up thread for local cancels

When doing lockless IO on the client, the server is
responsible for taking LDLM locks for each IO.

Currently, the server sends these locks to a separate
thread for cancellation.  This behavior is necessary on the
client where a lock may protect a large number of cached
pages, so cancelling it in a user thread may introduce
unacceptable delays.  But the server doesn't have cached
pages, so it makes more sense for the server to do the
cancellation in the same thread.

We do this by not spinning up an ldlm_bl thread for
cancellations of local (server side only) locks.

This improves 4K DIO random read performance by about 9%.

Without patch, maximum server IOPs on 4K reads:
2864k IOPS

With patch:
3118k IOPS

This is the maximum performance achieved with many clients
and client threads doing 4K random AIO reads from different
files.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ia996732780d278c5d0bc290c5484e3bc325a347a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52192
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/ldlm/ldlm_lock.c