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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD595C77B61 for ; Sun, 16 Apr 2023 05:54:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229876AbjDPFyz (ORCPT ); Sun, 16 Apr 2023 01:54:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbjDPFyy (ORCPT ); Sun, 16 Apr 2023 01:54:54 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E26D2D52; Sat, 15 Apr 2023 22:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=TBtcpsXHeVpbPsSte8uqDCd7VMaCKEQiVcvyKRXX7Mg=; b=j5v+Vx78d62tZwWrCr9W+wLTGy ixFBl82hsUDRTvJYcHKmSVUrCIZXu4pJnyZpGCAs+aGltHNkeQjmqsI28wEXJIgjcDRkNPZsiCzLN LnXDLXTDebBnKZiioBEQFGH91J6VmcwjrxW/MxOeWHjZmnXT0zZbtgjJNVBUmEspvJl2lW1hCVTUp bPigqFbqljbFRaIob6Vlv5z2V64V4Qi2SulnmMxlKZhAJouRSidC6BLVTJRbuHKtWwcsecBwkaqhx 97UuwsuzGG8b2w4rPlA/F9IQDZttleOaGKh+YoGncGeVIarSxQNrFnATN3gNEws+Ry2vmCf7IvXKC zSz3s3Zg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pnvLd-00DBwW-26; Sun, 16 Apr 2023 05:54:49 +0000 Date: Sat, 15 Apr 2023 22:54:49 -0700 From: Christoph Hellwig To: "Darrick J. Wong" Cc: Christoph Hellwig , Miklos Szeredi , Bernd Schubert , axboe@kernel.dk, io-uring@vger.kernel.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, dsingh@ddn.com Subject: Re: [PATCH 1/2] fs: add FMODE_DIO_PARALLEL_WRITE flag Message-ID: References: <20230307172015.54911-2-axboe@kernel.dk> <20230412134057.381941-1-bschubert@ddn.com> <20230414153612.GB360881@frogsfrogsfrogs> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230414153612.GB360881@frogsfrogsfrogs> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Fri, Apr 14, 2023 at 08:36:12AM -0700, Darrick J. Wong wrote: > IIUC uring wants to avoid the situation where someone sends 300 writes > to the same file, all of which end up in background workers, and all of > which then contend on exclusive i_rwsem. Hence it has some hashing > scheme that executes io requests serially if they hash to the same value > (which iirc is the inode number?) to prevent resource waste. > > This flag turns off that hashing behavior on the assumption that each of > those 300 writes won't serialize on the other 299 writes, hence it's ok > to start up 300 workers. > > (apologies for precoffee garbled response) It might be useful if someone (Jens?) could clearly document the assumptions for this flag.