From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail115-79.sinamail.sina.com.cn (mail115-79.sinamail.sina.com.cn [218.30.115.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF0481990D9 for ; Mon, 23 Dec 2024 11:13:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.79 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734952393; cv=none; b=NSN3nR7g7mh7QiotipN+Un76XFJjxW1oujvEuOzoklcikHUv8SZIMXaDbQUBoU/8Rn96VieLpvPhxME3fxB+gD4QpqOYqYc8S/0flNqSJFT/CF2lPfJ8b6YT0t5exTQfxiiIVt+cgQf50E99T5x7O/iin8P42wsGyEktsoZYcyM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734952393; c=relaxed/simple; bh=E4Z22IunIgmB1emC0ErQlC1s2OdI2WInS1rHRZLEAZo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Euw36xlEZHrSUljq+xJ/CBiZlX8RyIuplM+u/aN2LwSnXn+tp1cNpPBqa/XXbVY6TiFjYMXm3uD3+yXoknOOmTDOwK5R2WieuXAwUJLV5LmwlKEAgvqwsPTf0ztVhnafxm0HboAfl0wHnIrlioL2uOPfKu8jv+8NNKJkG39wN5A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=218.30.115.79 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([113.118.65.169]) by sina.com (10.185.250.22) with ESMTP id 6769459B0000786E; Mon, 23 Dec 2024 19:12:29 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 2647377602532 X-SMAIL-UIID: C1708BCF3F414DED9835CD1A37FA69B7-20241223-191229-1 From: Hillf Danton To: "NeilBrown" Cc: "Alexander Viro" , "Christian Brauner" , "Jan Kara" , "Peter Zijlstra" , "Linus Torvalds" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 08/11] VFS: add inode_dir_lock/unlock Date: Mon, 23 Dec 2024 19:12:23 +0800 Message-ID: <20241223111225.389-1-hdanton@sina.com> In-Reply-To: <173492340768.11072.6052736961769187676@noble.neil.brown.name> References: <20241220030830.272429-1-neilb@suse.de>, <20241221012128.307-1-hdanton@sina.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Mon, 23 Dec 2024 14:10:07 +1100 NeilBrown > On Sat, 21 Dec 2024, Hillf Danton wrote: > > Inventing anything like mutex sounds bad. > > In general I would agree. But when the cost of adding a mutex exceeds > the cost of using an alternate solution that only requires 2 bits, I > think the alternate solution is justified. > Inode deserves more than the 2 bits before such a solution is able to rework mutex.