From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751806AbdJPHeU (ORCPT ); Mon, 16 Oct 2017 03:34:20 -0400 Received: from verein.lst.de ([213.95.11.211]:53529 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751358AbdJPHeT (ORCPT ); Mon, 16 Oct 2017 03:34:19 -0400 Date: Mon, 16 Oct 2017 09:34:18 +0200 From: Christoph Hellwig To: kernel test robot Cc: Christoph Hellwig , Al Viro , Jan Kara , LKML , Linus Torvalds , lkp@01.org Subject: Re: [lkp-robot] [fs] 91f9943e1c: aim7.jobs-per-min -26.6% regression Message-ID: <20171016073418.GA28778@lst.de> References: <20171016024021.GH26196@yexl-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171016024021.GH26196@yexl-desktop> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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);