From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.50 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796174050; b=RzzzF5VdDDIdFKZ6VS8xYh9pmjZ8hl7W4YaJEhzVnaR2NfCCQNbujMKIn/iHJjzz29xw FBXGbX1HVjebAPYOvP8mPFMAjaz+gZJYyoawx0Mm5cri3bpLPM6qv9IlE2K3VGk9GTR7J AweBCA5FEgU27HgBe0DCAnZaiKgJMHrNPZuz8T+FqLNFHBL8gr2q/isa3krUMDQzn0fEu tgv+ythSWIGpBv9be7FPhRoLA2CTeKlQB8ugmFP4nNAhHCXIg1+oKDsb5kSwDoHRMTR1L 6CggDs0xAU+BtJe0fJwq2G/tx7zFI0j1BgvgNf15AW9gpIv2FlNK+ZX+iLg7EtzheZg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796174050; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=xtxNDuxabYczVsqsPUxgU8lx6srpTLfk7vRvTwB+o0I=; b=hdqNVGHzZaUnsupG9sdLnyurtfxVI9cUj27VpZ2RI6LHR2XIAmsT9XfaF/C2gC/XOdrx 78JQWDtuZL2gfrAvPYu/pBgP9SBZSQsOATtKeCpL4csWn4yxWfq6zzUoCyotphJLacE/9 hMh/lmxSvzWubm32Ke0T0Y6AuO88v2E2OLnf/UIeFCvwHT6k/Dzd9KdWe54vrxlsC4I8Z oWhSA7j6fwa7dBUvg0yKGpCnEQuRdDFDZKAQ4a63uOy0Hx3pyStVmk52HBZZRvX6fHXZQ 4moGf8GqsAvDBrJIv4CGNuSgA3TybIkYZvMyrVM0BQqTzOz+ogLwRbESpYT69YmjzJw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Wic1xoI3; arc=none smtp.remote-ip=209.85.128.50 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 05A6D606A322 for ; Wed, 2 Dec 2026 01:14:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 05A6D606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Wic1xoI3 Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4bb64ef5a14so115673225e9.1 for ; Tue, 01 Dec 2026 17:14:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796174048; x=1796778848; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=xtxNDuxabYczVsqsPUxgU8lx6srpTLfk7vRvTwB+o0I=; b=Wic1xoI3POJcwhl5VqJClmPBW5+CqXbOPP/6NB1TO+vl2Nf7qno5djWwDKJwFLS1mI 5cjrqlCjLVZMbzQWhIIKEXkAeDalf3DmmTqb/zWcIP9cMUzmSm4ILSkuV56iL7yVOPun 5R0jIVsa7Q6iQ+gJSltybqUVJxohQ1IOJFTQOmXEus0Q2gDI6JQVCb4tFBbsAV6IkGpb CUPs92GMaOKYKr6xgfMTsacLn04JAfOjyeaMObACKr052z+cfEYgzjTObkh21ukG8un9 VxQ1WSeKoGdymTANpvSUEkX+lpevdQs84pj9zkhxee4+LKx2IU8x1RYF9YP6cIQuYlCX fMww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796174048; x=1796778848; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=xtxNDuxabYczVsqsPUxgU8lx6srpTLfk7vRvTwB+o0I=; b=Aaeq4uJHtZa5C944JQjqraSH+/dwIWlrw8c0Eh8M1Nd33MYkmLcbxsWFxxlI2gj7sg P6nZhaX32674Z+kkJJoGFjkpYi4q7pUk89eKYgoo+AOZdTUT2y2CwGozbIAYyUkHmQf7 5Y66G3ok6lwTqJUUxHX7dBwKc9gHGUx3U3KmLi4Fak7u2dFR724viYD5AuKsj68ajQYd s0UCA68W6P3EIKnDIsJVJU/z/G7ni+TTG1fNo1WZwL3p/Zp3Hk5ncV4UfeaS2rxAupMk QAmxytmXXld7TWQ7NgDopav9yblsaHMbDIoQs2AUAtT65FAuzX/SUGPQTiL5GHZKK48+ 9aQQ== X-Forwarded-Encrypted: i=1; AL+hErGJvfUl3TQtXyjlcwjto2aqUo/b4S18bZZ6P2AEGHiiEQUtopbvxyCCZO5VceXSKq+3fO8NLs5+tKog+ec=@vger.kernel.org X-Gm-Message-State: APuU4Z9A1asmDH3Nt0qrDsqL5g/SckXm2+jux8bovDCANxegWYgD4oF1 ETezQVwFuwQxPk2pBW9fPZ1gfNeVCGPx7HOigNpoxeGuyQ0e1nav1o/U X-Gm-Gg: AZFdTZdLSqvFcfkdhYDR3Jyd3Z5yMgCkneztVJ4Xbzby6jpUKRZ8oduZgGr9gh76LDd c98mXAYnvd9qjezBTaNoOSEJMo/7eworStFOzsbpU+4iH4aw+UsEDxus98tANiGsDjP+c9jC9wM a/z9e7WWXm/8NQhpHDF980TocmPg3JJ6/YDBIpuQXZkBpTih1cvojrgtrhIhpgWi35SE+pJxc3d ftQRs4dBCzkLNqyPR+EvAVQI1XwkpY785Lrf1I3u/3uoA+DlcYJi60xU/zpGyRbE1W6WL0UPELJ YQg6AWR5x/nh3coOyQCLTAKcwdVVMKh1dplbojb3JsS1Tz3RLR6PIb95VE7iFSc3EyvedEAP72e JZnGDMKQMGo/zmYofaSf1vi1rBjwb/GXMm6brnoSLuqXVp09KUwwYgT3g14xnD+TMdf5eL+XH+g 1uS24/a28Hjg8FsUaTGeHpC1o+ATn5P0IO7iz2xUnTc0+a25yZ1IRg2uGm19dMZDA7ECu9fHMnz G4ciGk/CTQsr01YS2O4CcTq5d5loVUR1guWr7VcFr2cBX23NPWdQ5R2XN6xG9ogtQkPqeCUEIJz 8AR8BASF5vlvNynFtF/rr6r9XbT7soP18TDm1RPoL45zIqyJoDUvuDANYZCN7qSUhuqsyE5ceX4 9jCELOO+HdXbmIudCkNbhXhJh30pCgBYdGNeWbsLy77RDLXCvlk4ICtndvmoGPSJUc/CCEaRRkf O54zAUXx0VB92iLicwRm2Y0BvKLFnrB4LtobK11IgTwGI8HQJTM0l4hKbtjf77+Cl8LfU= X-Received: by 2002:a05:600c:4e4c:b0:4b6:5dac:b61e with SMTP id 5b1f17b1804b1-4bb88938d2dmr720292215e9.32.1796174048171; Tue, 01 Dec 2026 17:14:08 -0800 (PST) Received: from MacBook-Pro-von-Karl.localdomain (dynamic-2a02-3100-a5c9-8d01-34fb-c870-a93e-3922.310.pool.telefonica.de. [2a02:3100:a5c9:8d01:34fb:c870:a93e:3922]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb8538b09bsm1940811905e9.4.2026.12.01.17.14.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 17:14:07 -0800 (PST) Date: Wed, 2 Dec 2026 02:14:05 +0100 From: Karl Mehltretter To: Gabriele Monaco Cc: Wen Yang , Nam Cao , linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 04/14] rv: Disarm HA timers on the storage free path Message-ID: References: <0ab3632933008e028855e158b4b978881a2715dc.1793900349.git.wen.yang@linux.dev> <20261130044335.31832-1-kmehltretter@gmail.com> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Dec 01, 2026 at 08:30:03AM +0100, Gabriele Monaco wrote: > > da_monitor_destroy() also needs rcu_barrier() after this loop so > > in-flight da_kfree_cb() callbacks finish before teardown returns. > > In theory, yes, but I believe that's only relevant for RV monitors as kernel > modules, since after return they can be removed at any time. > > Currently, we do not support that. > It doesn't hurt to rcu_barrier() unconditionally here, but I'd say we can have > some cleaner and common solution once we support monitors built as modules. > > Or am I missing something else here? > I was thinking about disable followed by re-enable. Storages already unlinked by da_destroy_storage() are no longer in da_monitor_ht, and synchronize_rcu() does not wait for their da_kfree_cb() callbacks to run. If a timer is still armed on one of those storages, re-enabling clears ha_mon_destroying before da_kfree_cb() cancels it, so the old timer can fire and report a violation in the new session. I reproduced this with nomiss using rcu_nocbs=all and delays in da_destroy_storage() and da_kfree_cb(). A timer from before disable fired after re-enable, and rcu_barrier() in da_monitor_destroy() stopped it. Your dead flag would have prevented that. But with init-once timers and unconditional cancel on free, da_monitor_destroy() still needs rcu_barrier(). Thanks, Karl