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 C07D8C04E69 for ; Tue, 1 Aug 2023 00:47:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230242AbjHAArz (ORCPT ); Mon, 31 Jul 2023 20:47:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjHAAry (ORCPT ); Mon, 31 Jul 2023 20:47:54 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD272116; Mon, 31 Jul 2023 17:47:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=JdZdYfH9Sqqb3oTstrTYwWa0TUTpdBVuYJoktWPnoKE=; b=BaZsjQ3q1NctuJkj/OvL42HX15 2KGWN7mUpgailrix6+RSNsan/8fJ14pbvqX4vZgc+4/yBD6fE0KiIgDyqYUVnzd6JINU+bQxAB0no PFvVx0talBM0nASoxdUWv49Ej89gnvM9Xp29N0RBgkmTvwAMP1kFj5D6IW0uFrXnB8T9IpIRG+UHN oMQh//+SCGebOsd6tPQI9zxzCAHvvxIKGcbfudksidij6xIwxG9sP21icRzr6JAR7Gw9f88CaGZzs sFI9PPuV2dpiBfJcuWXH8jadP+VCoI+RqiEHupwSz7Dz0Ftic6yaS4rqSTH+zf6YptcMDa5pYVGsT dw4BiotA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qQdXv-004lPt-BA; Tue, 01 Aug 2023 00:47:31 +0000 Date: Tue, 1 Aug 2023 01:47:31 +0100 From: Matthew Wilcox To: Jens Axboe Cc: "Darrick J. Wong" , Christian Brauner , Dave Chinner , Hao Xu , io-uring@vger.kernel.org, Dominique Martinet , Pavel Begunkov , Alexander Viro , Stefan Roesch , Clay Harris , linux-fsdevel@vger.kernel.org, Wanpeng Li Subject: Re: [PATCH 3/5] io_uring: add support for getdents Message-ID: References: <20230718132112.461218-1-hao.xu@linux.dev> <20230718132112.461218-4-hao.xu@linux.dev> <20230726-leinen-basisarbeit-13ae322690ff@brauner> <20230727-salbe-kurvigen-31b410c07bb9@brauner> <20230731-gezeugt-tierwelt-f3d6a900c262@brauner> <20230731152623.GC11336@frogsfrogsfrogs> <22630618-40fc-5668-078d-6cefcb2e4962@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22630618-40fc-5668-078d-6cefcb2e4962@kernel.dk> Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Mon, Jul 31, 2023 at 06:28:02PM -0600, Jens Axboe wrote: > It's also not an absolute thing, like memory allocations are. It's > perfectly fine to grab a mutex under NOWAIT issue. What you should not > do is grab a mutex that someone else can grab while waiting on IO. This > kind of extra context is only available in the code in question, not > generically for eg mutex locking. Is that information documented somewhere? I didn't know that was the rule, and I wouldn't be surprised if that's news to several of the other people on this thread.