From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from 011.lax.mailroute.net (011.lax.mailroute.net [199.89.1.14]) (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 209E22DB785 for ; Wed, 10 Jun 2026 16:33:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781109240; cv=none; b=FFIbyXwATLiUJP9Cy9DbNIZ33qFB9t+E6hcdbsJL0+Dneq0IPhl1BDo57Ad73ayCGx0GW5wQ7l5P24WBCTpPUJEIdm08+WSur7+dTXNpevg0m+4XnYyrqe+uOqALWBpsgobgapjW45SK59kqHRtJfMIFXNKBrCYFAbJ3CxcCr8c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781109240; c=relaxed/simple; bh=2P1ufNYwX5aDy5B8yu60dLFcphIRdJoO7PuNzPd0jvE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GfHIIO8SAh8GZwoTFcqGIyrc6EyG57icwFGJpRIdPtPX5ONiXlVs3ejv4Hr5oEpc1KpYk5ZDXgHeHk68zKpxf3N+wc8SeRPpOyw7TMiHrXn+OM0rB9pA1AqO67Sac/OucgR5qE1f5aXRwL3hlbDnLfDN0IfPor5SxoO2ociTRp0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=Yd6Ikihq; arc=none smtp.client-ip=199.89.1.14 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) header.d=acm.org header.i=@acm.org header.b="Yd6Ikihq" Received: from localhost (localhost [127.0.0.1]) by 011.lax.mailroute.net (Postfix) with ESMTP id 4gbBDk4fX9z1XLyhV; Wed, 10 Jun 2026 16:33:58 +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=1781109234; x=1783701235; bh=UthKItBJ0Ql3cn29kL0xm6tT xzbT73HKtBpGrowaudw=; b=Yd6IkihqfgbY1xTmZdd2FjYZ2ujZmuvHUBWw5K// SkWdO7QPOCuv6MTSLWC7SsZa2u1JtIXLlcR+8bdQok9SuIzyuF0IrIVdDNwEewxs Ww/qPi2TUG5Vt4CoYXM3ezUSnHS1rewCZjA5405N6eM8gHx+lXI2hpFDqoLPUovc mEXtB7SQMl2hSNsQOCMI7iQVO1YltlGFszkW2mblWexRAIgOZutBP/yHy9LeccNb yJnJMKD01uzi0LsBkvNkDzefTJuWEj4kBRWuwLIi/eFbaHNcIvzH0elDtpH2rtPS rURryuprhWYEep2o2yo7u3CPpmn/2gZdWJ/LCuMq00Cjhg== X-Virus-Scanned: by MailRoute Received: from 011.lax.mailroute.net ([127.0.0.1]) by localhost (011.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id 88Jsxw2s0YNG; Wed, 10 Jun 2026 16:33:54 +0000 (UTC) Received: from [100.119.48.131] (unknown [104.135.180.219]) (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 011.lax.mailroute.net (Postfix) with ESMTPSA id 4gbBDc0cnmz1XLyhT; Wed, 10 Jun 2026 16:33:51 +0000 (UTC) Message-ID: <78da28e4-97c1-405e-8edc-707e62577b51@acm.org> Date: Wed, 10 Jun 2026 09:33:50 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 11/15] nvme: add Clang context annotations for nvme_queue::sq_lock To: Nilay Shroff , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Cc: hch@lst.de, kbusch@kernel.org, sagi@grimberg.me, axboe@fb.com, elver@google.com, gjoyce@linux.ibm.com References: <20260610142743.115898-1-nilay@linux.ibm.com> <20260610142743.115898-12-nilay@linux.ibm.com> Content-Language: en-US From: Bart Van Assche In-Reply-To: <20260610142743.115898-12-nilay@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/10/26 7:27 AM, Nilay Shroff wrote: > static void nvme_free_queue(struct nvme_queue *nvmeq) > + __context_unsafe(/* frees queue which is no longer in use */) > { > dma_free_coherent(nvmeq->dev->dev, CQ_SIZE(nvmeq), > (void *)nvmeq->cqes, nvmeq->cq_dma_addr); > @@ -2176,6 +2182,7 @@ static int queue_request_irq(struct nvme_queue *nvmeq) > } > > static void nvme_init_queue(struct nvme_queue *nvmeq, u16 qid) > + __context_unsafe(/* safe to init queue without any protection */) > { > struct nvme_dev *dev = nvmeq->dev; __context_unsafe() is a big hammer that disables context analysis for the entire function body. Has it been considered to use guard(..._init)(...) instead? Thanks, Bart.