From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.118 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796285308; b=CJcrZ5H9zbBznZoLVeusZ0B2MmQG2PLPFT6BfA76mE2BuCf96sSC2PjDXM3f/SaucLw5 2PRW4d0cmzZl5D/2rmIo0aCnZWX3AY2J52odoBH4/+4CuTC/Z3x/qxXdQIn3LByeCIZoQ flr5JLWjLrKozqJO2p7Fr6NSU9Z/dm7C34jz08C8QGYORdD9Pj6WxlhOKOFwVC2ln/jfr 0QKvwUuFtOkfopwfUysIc6frthZDJVMM588ZF3JOVD+UEAi/0z+RLp0T4bGpEd80/93ME SlzyY/sZLQr+FEx3LEfEEqrOx4hJjU+pINRzYkMvyi7tUvxeGgOBH6AYKLHJSgZNkKw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796285308; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Cc:Subject:To:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=YjWG83mmMKfsJsdGSAUyAljFv5UfxUqoGCFWUN9Ehac=; b=F3ZoG2AHCNdWKgGSU1veDUc8fu9dR2vZJNNCRJ8YbZ0gpoOVoD6REwFkQ8338wIMzO0m TrXbZYI+r7rvqCey3uGgQtkgQM0B6gupeaVQBvZ7EiDMs97GyYFZWCOlS2eSeHSz6OgUG U2N7Re0r9F/ORNZ8NH0DDO29Mk8mUGDY2ylclJq/WkWt1jF4YyTbvN//vgVwkxIqM7PRO hsuTkRvJfOxwsOjsYh/NQCqpFy2Pj5gv5aR3NRAUt1Ter1wuPGO4qkeuDta5btWJFzmST 8Cs+YHOkIpgDZt+TQVuprI00Ld3Ly8GG+Awn03GQkmV8JHA29emTvhYK5YbJCQmZKPw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=pRyWcg+M; arc=none smtp.remote-ip=95.215.58.118 Received: from mta1.migadu.com (out-118.mta1.migadu.com [95.215.58.118]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2BC3606A337 for ; Thu, 3 Dec 2026 08:08:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A2BC3606A337 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=pRyWcg+M X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=DCYAOkp0+FSq8MnsMae14GYEVwBQ6hnbC5L17w9k8YI=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796285305; v=1; x=1796890105; b=pRyWcg+MNeA6YHZBWniUOiM7w8NvXXUPNJ06rKejpdcVtTCE5faq4mN16T9BwAWiFQQWFnjr nwcoYU00y0BHjfuSp6WNkcJI/uiJ1CdHkeZd8XIxlzDeGiIE5Cv0fWF8fTMzqi+c7+Bt7wmcj4D j+1Q+EtxrXw8kK0OL9/+SbF8= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 2920d2730f70d1cb; Thu, 03 Dec 2026 08:08:25 +0000 X-Mizu-Trace-ID: 2920d2730f70d1cb X-Migadu-Flow: FLOW_OUT Message-ID: <96ef9059-0277-485d-b771-d16c253e994d@linux.dev> Date: Thu, 3 Dec 2026 16:08:16 +0800 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: cui.tao@linux.dev, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Shin'ichiro Kawasaki , Jens Axboe , Christoph Hellwig , Tetsuo Handa , cuitao@kylinos.cn Subject: Re: [PATCH v9] loop: defer the queue limits clear to a workqueue To: Bart Van Assche References: <20261126054223.176824-1-cui.tao@linux.dev> <20261126135628.495497-1-cui.tao@linux.dev> <46cefe96-a193-40f9-bc1a-facc73cf6afa@acm.org> <0523850b-2049-41ff-8dfa-ca3a8f055a5f@linux.dev> <6eed3fd1-3c0e-42ac-8d86-634522516f05@acm.org> <2FD3BF4D-509E-4A3E-B605-D6DD16226148@linux.dev> <364fdb6c-bb22-425d-8109-c954e269fff0@acm.org> <232e31ac-6e41-443f-a708-4e41a14a0c76@linux.dev> From: Tao Cui In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hello, Bart, 在 2026/12/2 23:13, Bart Van Assche 写道: > On 12/1/26 5:14 AM, Tao Cui wrote: >> Done: the work item is now queued on a dedicated unbounded workqueue >> (loopc%d) instead of lo->workqueue, and lo_free_disk() drains that >> workqueue before the loop_device is freed, so outstanding clear work >> items cannot outlive it. >> >> On the deadlock concern: I could not trigger it on either queue >> placement, despite trying fairly hard with an adversarial mix of >> LOOP_SET_BLOCK_SIZE, LOOP_SET_DIRECT_IO, write-zeroes and rebind churn >> (600 rebinds, 10,000 queue-limits updates, up to 56 concurrent failing >> requests, stacked loop devices) under PROVE_LOCKING.  The backing >> files in these tests are memory-backed, so the drain times are short. >> The failure reporting stays at exactly one per binding throughout, and >> no report, hang or deadlock was observed with either the shared or the >> dedicated workqueue. >> >> The full suite (loop/011, the concurrency sweep and the mkfs/unbind >> stress) also runs clean on both kernels. > Has v10 of this patch already been posted? > Not yet, that message was design-only, and I held the patch pending your feedback on the direction. Posting it as v10 in this thread now. Thanks, Tao. > Thanks, > > Bart.