Whamcloud - gitweb
LU-17078 ldlm: do not spin up thread for local cancels
authorPatrick Farrell <pfarrell@whamcloud.com>
Thu, 31 Aug 2023 00:10:30 +0000 (20:10 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 15 Apr 2024 09:56:00 +0000 (09:56 +0000)
commitf26bfb318d9e28a59736ff0bb17d71ab7850f2ad
treece4e5a35423f72786e26046c30ddedcbb05d5cac
parent04f67c68540f044f2a1ccfcf6285de9538221747
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.

Lustre-change: https://review.whamcloud.com/52192
Lustre-commit: 291ac6e6925e3bdf31f527de2bedf5f19706b230

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ia996732780d278c5d0bc290c5484e3bc325a347a
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52193
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/ldlm/ldlm_lock.c