From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4B5218EB0 for ; Mon, 30 Mar 2026 18:15:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774894542; cv=none; b=mTnFtoPtBL2jVbs6u+H/KxHa99D4Yex8zGNm1WOFjs7d2pYZoiNFMo/j/8uIsepg2tspdcgYFAMmEbUQx7WdOdITdG75dp6obci78Q8v6QuDBw20ijGjZ9pN+0KgufkLSp4SK+29mcTXFiatYhOmj3V0T3zU0txtULihf0VQL8k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774894542; c=relaxed/simple; bh=grrOENSOquk559ZYsJPJhA8XT/+3YcHQonszuXJYwt4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=M7jzGwxfWA7BpTju7TWWD0q+ERuy6B502T/8useVkScnn68ru1iiMZZcMSPyFRcN/rq0CUzDOn5C7WRX5Gsma00tQbSh7j60Zjhho0Z/38Spx7qPVn7J2y9bBzydYT0O8G6/tvawpcd85DoWbqTOajxfjC2tGy4ukKFKBI0zTuU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=oDOgXPOd; arc=none smtp.client-ip=209.85.215.174 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.b="oDOgXPOd" Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-c7358a7a8d1so3282012a12.3 for ; Mon, 30 Mar 2026 11:15:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774894541; x=1775499341; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=grrOENSOquk559ZYsJPJhA8XT/+3YcHQonszuXJYwt4=; b=oDOgXPOdudZQYvms0tTBAZ/CXheZDSN72YsnOC0adcwPuPXsuKLQ4D/23QR3BRBO8b JTemjEnPGl0CvwsPoWITbYwrygSkhjkXY1Th3ZZsBcLjFvQ1SiRVipBLdbEu74WruSMx VY+QHVA0GdTy84xLx64ogHYjXmILRxQWa3jqFS0W60nQ01X91TD7zxT68UR9vplGn4TD ngMzOc1lGjwgMZLjiMvHUrIy3uvD6BnDHUpTDuAmeiizbnVeW5snuZXYJVANLRk4EUW1 vqOZWcabf04KERfWfFIp6y6raij5u9D/0KCJLraxlQqBhfb8P/h4DEuq8yb5sGoicMZo HVpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774894541; x=1775499341; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=grrOENSOquk559ZYsJPJhA8XT/+3YcHQonszuXJYwt4=; b=I6HM1gAZ7TZm42ESnk8S/AykqlFardA293g1fD5SCnokVPTHxT3J/RTL1VkbdnmGC8 m3PAxe68H09E+l8Sq/rQLpiOrCtwdmNRAyxY9UjceWwkEVv4oVnY5I0J1BMFtEE+YquJ cPK7uaSiG2BrD0VaU/4I3TnRuXK0ull+XbdNWD0VC87j/gVCUSXc/u1QsdvW4QCyk1yN FSQcqc9k5oQTxhlmrCC1Og1XlFr5qtRo62A7aNqDMRP0SEn0h4f8jE5aXmBJZB7m4Dag bK0dWg+8EuNSjqIfSAjQwBh1RbrI5z+WTT8XQV08+w8QekqWdS6UT74YmZi6419c/fqq cw4A== X-Forwarded-Encrypted: i=1; AJvYcCUHO2SOLlfP3Ua7NOr63jNaPOAvQVymyWLEjmj2SaL3O7z/lrfIJrKYjQ37vcXPqeFxrHZSXYpdKvcgWCo=@vger.kernel.org X-Gm-Message-State: AOJu0YxzTwa45MypOEAOggpSLjNrxasLkeQv0qJ2q9Su8RDVA85V2AVU BN5i6LpV2JBc/66EZfCOyWCFMNjm7hRwuX5K/RLiu9xup0mVCe2EFyfm X-Gm-Gg: ATEYQzybGsts9cljNUlfghheaBBDh3nrRRwIOZeIt45zduiHXoUG6b7j3IEEkKKa2/g 0LosOxLf36gzugXWYYTiPUSbARNXvTX9a3areLeYAW5qLpGKhdSP8zmkI4rCBoYYgvynQwFEP9r lCtegtAoJG1AYd8NdS6JhJqxBSORJQOAPuYMgvZNa9ngt+Q7ffpfvEC7x0osW62C5oieEDE4eBV M3pb7zpFdC9gjLJceEXKwiaztqW/ky3bQC2gzmZmrr5/gmPAnoL20BotbX8HY3HcQUW6slCoXxa /RwaBQQsvw00qoKk8Ej539vUccb0py5oXgLglqqgiHDFijE8WfiZ3phK+RTuEp9Dvizp5Ai9g44 pZCvn0LjRpQG0yvQudX1tg5Wtj5VdAYiRed8FqZmjHZoe+nv+GrCYJQTGgyp3OV/vE+BvY58b+b FgPwvLN9HtlBrIFly6IVFlFycsZB9RCZ3ajA== X-Received: by 2002:a05:6a20:7285:b0:398:9d5f:e093 with SMTP id adf61e73a8af0-39c8788a374mr14715749637.19.1774894541095; Mon, 30 Mar 2026 11:15:41 -0700 (PDT) Received: from ubuntu24.lan ([14.219.52.214]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c76917bacb6sm6777226a12.24.2026.03.30.11.15.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2026 11:15:40 -0700 (PDT) From: Yiyang Chen To: wang.yaxin@zte.com.cn Cc: akpm@linux-foundation.org, bsingharora@gmail.com, cyyzero16@gmail.com, linux-kernel@vger.kernel.org, oleg@redhat.com, thomas.orgis@uni-hamburg.de, yang.yang29@zte.com.cn Subject: Re: [PATCH] taskstats: retain dead thread stats in TGID queries Date: Tue, 31 Mar 2026 02:15:34 +0800 Message-ID: <20260330181536.31134-1-cyyzero16@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260330205752003Xgw7LWOZDJvdiHCwa5If0@zte.com.cn> References: <20260330205752003Xgw7LWOZDJvdiHCwa5If0@zte.com.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Yaxin, Thanks for the review. > 1. Capturing the final delay-accounting update before task exit is necessary; > otherwise, cumulative task delay will be underestimated over time. Yes, exactly. My patch preserves this behavior — delay accounting was already being accumulated in fill_tgid_exit() via delayacct_add_tsk(). What I'm doing is extending this same pattern to other fields (ac_etime, ac_utime, ac_stime, nvcsw, nivcsw) that were only accumulated for live threads but not for exited threads, causing data loss in TGID queries. > 2. For fixes of this kind, it is best to include the issue/bug ID that is being fixed, > so the change remains clearly traceable. Thanks. There is no formal issue/bug ID for this problem at the moment. If needed, I can try to report one and update the patch accordingly. Thanks, Yiyang Chen