From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD104C3A59E for ; Wed, 21 Aug 2019 03:35:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B47C206BA for ; Wed, 21 Aug 2019 03:35:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727261AbfHUDfA (ORCPT ); Tue, 20 Aug 2019 23:35:00 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:33590 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726693AbfHUDfA (ORCPT ); Tue, 20 Aug 2019 23:35:00 -0400 Received: from callcc.thunk.org ([12.235.16.3]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x7L3Yhb1026351 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Aug 2019 23:34:45 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 57CCD420843; Tue, 20 Aug 2019 23:34:43 -0400 (EDT) Date: Tue, 20 Aug 2019 23:34:43 -0400 From: "Theodore Y. Ts'o" To: Joseph Qi Cc: Jan Kara , Joseph Qi , Dave Chinner , Andreas Dilger , Ext4 Developers List , Xiaoguang Wang , Liu Bo Subject: Re: [RFC] performance regression with "ext4: Allow parallel DIO reads" Message-ID: <20190821033443.GI10232@mit.edu> References: <6DADA28C-542F-45F6-ADB0-870A81ABED23@dilger.ca> <15112e38-94fe-39d6-a8e2-064ff47187d5@linux.alibaba.com> <20190728225122.GG7777@dread.disaster.area> <960bb915-20cc-26a0-7abc-bfca01aa39c0@gmail.com> <20190815151336.GO14313@quack2.suse.cz> <075fd06f-b0b4-4122-81c6-e49200d5bd17@linux.alibaba.com> <20190816145719.GA3041@quack2.suse.cz> <20190820160805.GB10232@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Aug 21, 2019 at 09:04:57AM +0800, Joseph Qi wrote: > On 19/8/21 00:08, Theodore Y. Ts'o wrote: > > On Tue, Aug 20, 2019 at 11:00:39AM +0800, Joseph Qi wrote: > >> > >> I've tested parallel dio reads with dioread_nolock, it doesn't have > >> significant performance improvement and still poor compared with reverting > >> parallel dio reads. IMO, this is because with parallel dio reads, it take > >> inode shared lock at the very beginning in ext4_direct_IO_read(). > > > > Why is that a problem? It's a shared lock, so parallel threads should > > be able to issue reads without getting serialized? > > > The above just tells the result that even mounting with dioread_nolock, > parallel dio reads still has poor performance than before (w/o parallel > dio reads). Right, but you were asserting that performance hit was *because* of the shared lock. I'm asking what leading you to have that opinion. The fact that parallel dioread reads doesn't necessarily say that it was because of that particular shared lock. It could be due to any number of other things. Have you looked at /proc/lock_stat (enabeld via CONFIG_LOCK_STAT) to see where the locking bottlenecks might be? - Ted