lkml.org 
[lkml]   [2017]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [lkp-robot] [fs] 91f9943e1c: aim7.jobs-per-min -26.6% regression
The only change for the non-nowait case is that we now do a trylock before
locking i_rwsem. In the past that was the more optimal pattern. Can you
test the patch below if that's not the case anymore? We have a few more
instances like that which might also want to be changed then.

diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 309e26c9dddb..ad61c78605d1 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -258,10 +258,11 @@ xfs_file_buffered_aio_read(
ssize_t ret;

trace_xfs_file_buffered_read(ip, iov_iter_count(to), iocb->ki_pos);
-
- if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED)) {
- if (iocb->ki_flags & IOCB_NOWAIT)
+
+ if (iocb->ki_flags & IOCB_NOWAIT) {
+ if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED))
return -EAGAIN;
+ } else {
xfs_ilock(ip, XFS_IOLOCK_SHARED);
}
ret = generic_file_read_iter(iocb, to);
\
 
 \ /
  Last update: 2017-10-16 09:34    [W:0.094 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site