Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp306683ybl; Tue, 20 Aug 2019 20:36:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzj8R2E2mjF19VbTQv3PelxuEjsjorwJY8eILfeDdMpgyyqU3QgGvXqx0gokNBzJzfS+QSz X-Received: by 2002:a63:6fcf:: with SMTP id k198mr27392485pgc.276.1566358591285; Tue, 20 Aug 2019 20:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566358591; cv=none; d=google.com; s=arc-20160816; b=nXY398rQhCT/cv5H1veodqj/K1e0DyLyW3iO8U58nH++ACCSxCcmD3JMKSHLEIGMVD 32/+2fztTPgaHXEK+ce9GRNrLfy3Yi9l8txQXW+Vs/H9aTC8hyOg+kFIMeyaIOv0eJ51 ME1JdULm4pNKNbYId68uPQ/JO6eDBllSQS5WpcBCUG8IALZQ/KLQudTq8/PlG9Oe7wlE dbyFQf3tgdPeBRDfCNV78jdeKzujsN+AK6bGDZnli6y6HMHukIOObtQXwvbtZTO8dbpi sYmcB1blQUgkY3YQvvwxqpwBXYFnwVfAy6ftHxGrpsCLaRGI8SJgvo1N2wyFH/JWAAW4 va0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=AhlBH+RK15QNvkYkJKNbNNJhq3pUdh7eKMsOOM8wlII=; b=cJvANvqEy67FaRVhRurEFFMfoI7/PMgZmaorR0I7kK2CbHP100Av58483En4zw4otS 8A0B8niCOJvFWQNzGVduc8m69BtAPkOxGKzdrjJCSyTvcALemgjF1ehFZA0qVhbhvt7f M3ecxVR6+DQ8nhMyC9OFYawynO14q6lC5chfNbGQWFbxCEwOHXd9NiiDd+wIjlVzc2yE 4Wk+CWJyCAVGrkaD1ZbUOONt903a2PIQCwK8kI+XT6Z9bLOsSMxkc0mIdR3m4vLJxZlY pDATIELDxRxrTvNdjl1qRUZzZnQdMNth6v1lsiOlZukx8VWD2PjFaPJvconyhgD/SxWs oCUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2si13518801pgq.586.2019.08.20.20.36.06; Tue, 20 Aug 2019 20:36:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727152AbfHUDfA (ORCPT + 99 others); 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