Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp122066rwe; Tue, 18 Apr 2023 18:52:44 -0700 (PDT) X-Google-Smtp-Source: AKy350bJlWcW80qsoZjnsZyCwU9JJRQP6PGg0azpJDLQnHVmOWHYcPY8YCPvVIdt7KW80tZRtfnM X-Received: by 2002:a05:6a21:33a0:b0:ee:7fb0:da51 with SMTP id yy32-20020a056a2133a000b000ee7fb0da51mr561938pzb.31.1681869163798; Tue, 18 Apr 2023 18:52:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681869163; cv=none; d=google.com; s=arc-20160816; b=mlwYd3Rs4wU1A5i/GbeILKqWV4l2YKEQgBJn1PZ/1zN4j3fsNnpuMD/IaUxu3n8PoH fE89jheWKx2aN6ik7tOWGzVpB2+lflLf/eaWORc3feyk5pnNTmonpiqC7Xa2eVyENlvw SoO4gFThJFLpO+b3NRcHPQnWH41+W7yOWoXDvNHNkXEWLI5a65GG8rz6Km6mALv9lVfM CXlTGQFunNeSH2jrbDC362O6LsOPGoeHdIhNwjlHESc28YwPo+3gJh5U1+REgGR4i+1j gMx5779+KLOKrAzLryrWzsriG6KAj7aYBxeEvn+Nn4TxKDKuf2pz5n8AtveribUShiaA 9Sqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=CTWQHeFJ3ejIWTMeS4au4uWFQrR7IGwBMPklLJD51kM=; b=LFB9j2Fzl8Zoqz8JsbJxyY+SUP8nS57HTtIhTGboKtRLxCwJXvCP7mlviySXpdAAiY k0/hif200UzShFkYS3hVS0Xq7LGUobQUq6uQDUGo91Qi9FSLECmjY/SnlUS5ptbEsQ4M +bSyyS8ZzD+rk/FJ7UZ0QORvwgpdH3LyfX9iRZSgXZ9wRAur57MYSoLmhxhfG1GgN4v5 sArReC1ma8IgJMxf0mn75Gtsvq8GhS7IkXfB/GFd1Sr7428VxzbNBO9PuzqlwMfMDCkc P0ZIGXoKbah/Q2DIhhE4e4jl68K+t5t4RJa8XFzAU5IE0RRvIli7/rxOiWA6d26Vmv1b ziEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20221208.gappssmtp.com header.s=20221208 header.b=iY7gk4yd; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j19-20020a634a53000000b0050bf617d84fsi16199108pgl.249.2023.04.18.18.52.25; Tue, 18 Apr 2023 18:52:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20221208.gappssmtp.com header.s=20221208 header.b=iY7gk4yd; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231591AbjDSB3y (ORCPT + 99 others); Tue, 18 Apr 2023 21:29:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231588AbjDSB3x (ORCPT ); Tue, 18 Apr 2023 21:29:53 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EC6E83F2 for ; Tue, 18 Apr 2023 18:29:52 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-63b621b1dabso1331239b3a.0 for ; Tue, 18 Apr 2023 18:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20221208.gappssmtp.com; s=20221208; t=1681867792; x=1684459792; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=CTWQHeFJ3ejIWTMeS4au4uWFQrR7IGwBMPklLJD51kM=; b=iY7gk4ydmQXDkfNyu+MZGQblceMwQfO/z23bL/cPtba2iVUF4SzsDTs/xKVDOiBpUT I0ltsqqaDT7SgbUVaANpQf+201Hzyy2FIuVXbK2SlZbDSIvw6bWL3pD7zFySlNYZvzb/ sx3OatojqqQpZPP6EWjo16Ds6J7w/ZPNXVLhKpNPLwXMeCuw+ckAC7WMmUuO+6431lOt ebBE3LEupU+uIdn9IM6MqN7eumxHmVVW6V2sr+z7+4MSFnzphBV83lVJIO+jTPSUfdsl uMCzKP39dKDyV1zjX1MjQnT2BhA7LwvYhQtq0pBrHmvB6HOjJKR6guyu11o5zochPLch B+fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681867792; x=1684459792; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CTWQHeFJ3ejIWTMeS4au4uWFQrR7IGwBMPklLJD51kM=; b=S6Pl7Jn3urid22SfpXbE9DeKHuyYwmBUi4ru9EyxLOakXjeRkKmo5QNcX53Uib2ui0 AIZUQX5FP3CJAVpGHtIgOPHJ6zSVGvszjpWehmin0OjteGAu2vIvmKujeBltYtj852pL LZnbBT8ikFjd2r4L4CCxrbocCPZneQaeGiYo8sdv/dF1w31YaDXFof28v294cMK6XlVN Tl6mWFtSt3LfvzpsUuROimunMYx0oJ3ojwhrKzb39960oWcRrIQo+a11MR2H7kVLYcfP CUyvAsqDG0jRuf3imq9Q8ZMLuAWSVjCcrpuYOTVly+ZHWPa8roN+iNa4yFTxkjQtEW/S UgqA== X-Gm-Message-State: AAQBX9dqe7jopLtKUkiJ3j/SoVF9rb65a2X4E28RV/wGRrro8W52pB8c jEkbpyS8mvmQRtf/hWW+J/2x8w== X-Received: by 2002:a05:6a21:339a:b0:cb:af96:9436 with SMTP id yy26-20020a056a21339a00b000cbaf969436mr18922152pzb.0.1681867791653; Tue, 18 Apr 2023 18:29:51 -0700 (PDT) Received: from [192.168.1.136] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id q12-20020a631f4c000000b0051b8172fa68sm6508791pgm.38.2023.04.18.18.29.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Apr 2023 18:29:51 -0700 (PDT) Message-ID: <74244cb8-abf5-b559-5e9f-24d39c801855@kernel.dk> Date: Tue, 18 Apr 2023 19:29:50 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH 1/2] fs: add FMODE_DIO_PARALLEL_WRITE flag Content-Language: en-US To: Christoph Hellwig , "Darrick J. Wong" Cc: Miklos Szeredi , Bernd Schubert , io-uring@vger.kernel.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, dsingh@ddn.com References: <20230307172015.54911-2-axboe@kernel.dk> <20230412134057.381941-1-bschubert@ddn.com> <20230414153612.GB360881@frogsfrogsfrogs> From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 4/15/23 11:54?PM, Christoph Hellwig wrote: > 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. I guess it can be summed up as the common case should not be using exclusive (per file/inode) locking. If file extensions need exclusive locking that's less of a concern, as I don't think it's unreasonable to expect that to require stricter locking. -- Jens Axboe