From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=199.89.1.16 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796257895; b=FhkZ1Du/9fUoGQDNoN0CaZx2ReByAqs5m3I/bLm+54qZE8B+m4tnthlEU29C5KApod0j pKcFuCeqsTA8XnJtfODz/ugMlBGYjqEIiM4iI8z6O8P7CEVk0pOM86mq2ukxh2wkL+7sY GlmbscDsHMUkZx7Yb7ZjxLEmefvrfyhS9gk4w59tAVkbXjJlqyX+JlxbKJ8qv/8wM+hJE oDwjlCa20mxo7x81VxrpXYBHot0HH9VO3J8gg7baaZR/6EIMEFML5Ybj5n438mzh/nCGa eYobLq2bD7EjxbMY2HJazVmymrVrEzkl1WLG3nG0pxLkvGBUn6/xD8eRePEji5ywluA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796257895; h=DMARC-Filter:Received:DKIM-Signature:X-Virus-Scanned:Received: Received:Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc: References:Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=yIBR6rw9z4KvPjppL549dHbubtwjuBPZc9ed6Jq+F7s=; b=xBB/1NmXsf2GivjMsYfopsGGUNJ4n2RxbIUiLEwiMM6tiGHK1WleAJH6w/Wh3gAAHo6a CeDy0uabQ+S38uWr+bLL9n21BHOCqqUcTGsYBs6mkFsL+8Y9JDrS1pc8/W36WXW52BdBi iPoVhNTxoO9h27wtnBhMsMvZR7X/JDFHaLhxRNbMgaIXq9FeP1R5wX5/NdbjGchgt2RRO nH36icSUO61sBnoTUQ6nbNjYFBCXR9kqyMKiGTlnjIGY/976+q+KaUVlnHQF5yQkUeif6 dGEexPCWSO9X4opJER2N1hRx07vIZLnPX+tgsbAgd8ejE7vmSnGr1D1Ni5IrwmDuiYg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass header.d=acm.org header.i=@acm.org header.a=rsa-sha256 header.s=mr01 header.b=DuJ6epwo; arc=none smtp.remote-ip=199.89.1.16 Received: from 013.lax.mailroute.net (013.lax.mailroute.net [199.89.1.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6D29606A322 for ; Thu, 3 Dec 2026 00:31:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C6D29606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=acm.org header.i=@acm.org header.a=rsa-sha256 header.s=mr01 header.b=DuJ6epwo Received: from localhost (localhost [127.0.0.1]) by 013.lax.mailroute.net (Postfix) with ESMTP id 4jfwXw3MLNzlfvq4; Thu, 3 Dec 2026 00:31:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject :user-agent:mime-version:date:date:message-id:received:received; s=mr01; t=1796257887; x=1798849888; bh=yIBR6rw9z4KvPjppL549dHbu btwjuBPZc9ed6Jq+F7s=; b=DuJ6epwogvie2KHaTYYItf99/mthL+ouenG5or4R MutkJZamRpZivN7/mU6bDj5GfMME7rT9z1Be+kIFUASwG04Rk/E1tI0XFpOEJY8n 5jP/GHS8/z3dsfSxoNizSUI3c5g8XtqyNnZWElgJbt8/EUt4ovYnKm5Esj2d3Grx agm+irFaXjaIO/iRalUKOHEm5AcGtIyf5tJ7UFa7KxBXrCBcS6NhWdumFydjCdPP 1XPVJjkNDCNKr7pYmk4caq8RdFBR3x5nQaK4UznQZG+u8Alz2K/cCVK3KH1rmcLw yF07bxKib8z8EKwweq2In8q8tKnaYbWSvL8P9Umk1Lh7UQ== X-Virus-Scanned: by MailRoute Received: from 013.lax.mailroute.net ([127.0.0.1]) by localhost (013.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id fr7Ekovf_7hq; Thu, 3 Dec 2026 00:31:27 +0000 (UTC) Received: from [100.80.227.145] (unknown [104.135.182.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 013.lax.mailroute.net (Postfix) with ESMTPSA id 4jfwXv2ckhzlfvpx; Thu, 3 Dec 2026 00:31:27 +0000 (UTC) Message-ID: <1d016add-cf91-48ed-8e40-cf9606a0058c@acm.org> Date: Wed, 2 Dec 2026 16:31:26 -0800 X-Mailing-List: linux-block@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 Subject: Re: [PATCH blktests v3 0/2] Add an NBD performance test To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org References: <20261129235238.3445710-1-bvanassche@acm.org> Content-Language: en-US From: Bart Van Assche In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/2/26 4:23 PM, Shin'ichiro Kawasaki wrote: > BTW, I found that this test case causes a lockdep WARN below. In that sense, > this test case is good not only for performance testing, but also exercising > block layer. The WARN was observed with v7.4-rc5 and v7.3 kernels. I'm not sure > who to ask, but help to avoid the WARN will be appreciated. The LLM that I asked to take a look at the lockdep complaint proposed the patch below. This patch has not yet been tested. I will do that as soon as I have the time to do this. Bart. --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -1241,6 +1242,7 @@ static struct socket *nbd_get_socket(str #ifdef CONFIG_DEBUG_LOCK_ALLOC static struct lock_class_key nbd_key[3]; static struct lock_class_key nbd_slock_key[3]; +static struct lock_class_key nbd_unix_iolock_key; static void nbd_reclassify_socket(struct socket *sock) { @@ -1267,6 +1269,14 @@ static void nbd_reclassify_socket(struct &nbd_slock_key[2], "sk_lock-AF_UNIX-NBD", &nbd_key[2]); + /* + * The AF_UNIX receive paths serialize on unix_sock::iolock + * instead of sk_lock. Do not reclassify a held mutex. + */ + if (!mutex_is_locked(&unix_sk(sk)->iolock)) + lockdep_set_class_and_name(&unix_sk(sk)->iolock, + &nbd_unix_iolock_key, + "iolock-AF_UNIX-NBD"); break; } }