From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796183267; b=S2gNQ/t8i24IYbw1IMkAOXj1OxRt7P1Z/vWBG6oZ6sDkGfLUOnBpHZkn5c+TtDRw+uay Ykjv2M8RerPxSIy+iOgeRmU/CwX5GEkk/9i3Iv9MQo80qrRF3tpOxyXhBc/h46BYMEcH8 J9OAkxIWHhFcoSPQwadDgwb3rI0ZiyFlSsNKFAAsZBsqOaI/HGxndB1rpmQ8M5tSTFjr0 SWJfJjFOxruQNINqyxXNnYGTib91TDlQ5pvmKRGR8kHgOTo+O1oj7LarUNC+7xQ2oSSgy xq2Prm0taEXCmvQKm4xf4nqQESdwtn/3Sc2a5QDfkHfMwhDdDHdjowYaslVyd2z2KUA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796183267; h=Received:DKIM-Signature:Date:To:From:In-Reply-To:References:Subject: Message-Id; bh=uZTTVSfPmTnQt77CyVgjCAXCuzxZ37+4UoXLeeaQLn8=; b=mwQOmFWF/KmlqY76P9Od3ht1pId4BvI7uvsShacmWtH3zUA6FS/u6ennxSBLHp/Bs06w YGhdLh+ALwFRQfAEWkzdk9TiCOlnx27ZCEgKwK6snJN3nMFmhxKImjt9toX5eoiY4Y4Hw M0lcBHTrBGp6C5qLg1j2kWX0j63y8cpjzdSyzmR8coaMNvIZ8j+0mfCNMyotgDX86EKAS 3zZaVS+H4l+ztxsSVtSgdoaNrNSXxL0ag/QBCiLyNu3ZPsoQRkqEKO+xMecP2jxZzNymG 8agnQI9V6QXjmKIsYsQsmQxIq7XTV2cPTkrMsMIjyOGW6cqRp+R3voiyBhDBuyU+QhQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b="D1/ZyLZR"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E623E606A31A; Wed, 2 Dec 2026 03:47:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=D1/ZyLZR Received: by smtp.kernel.org (Postfix) with ESMTPSA id 450FD1F00893; Wed, 2 Dec 2026 03:47:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1796183266; bh=uZTTVSfPmTnQt77CyVgjCAXCuzxZ37+4UoXLeeaQLn8=; h=Date:To:From:In-Reply-To:References:Subject; b=D1/ZyLZRY31hbxVabF/xxbgRSx/4VdKC/GSUpZZPm9vMwnOf/w60fV3WhWwCmcWqh 8hC0sB/mHd55rUSk2yDc2MmpIvRufwlpXLlsaNwZV+xeNhAGuxEWbZDhNGaArq+ucz 76ezx7MofJYipPH+W6MkVSazypPVfSI3KtE9c2Bw= Date: Tue, 01 Dec 2026 19:47:45 -0800 To: mm-commits@vger.kernel.org,stable@vger.kernel.org,sj@kernel.org, jm5905938@gmail.com,evanfengff@gmail.com,devnexen@gmail.com, akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20261123150049.81317-2-sj@kernel.org> References: <20261123150049.81317-2-sj@kernel.org> Subject: [merged mm-hotfixes-stable] mm-damon-stat-avoid-32-bit-overflow-in-idle-time-milliseconds.patch removed from -mm tree Message-Id: <20261202034746.450FD1F00893@smtp.kernel.org> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list The quilt patch titled Subject: mm/damon/stat: avoid 32-bit overflow in idle time milliseconds has been removed from the -mm tree. Its filename was mm-damon-stat-avoid-32-bit-overflow-in-idle-time-milliseconds.patch This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: David Carlier Subject: mm/damon/stat: avoid 32-bit overflow in idle time milliseconds Date: Mon, 23 Nov 2026 07:00:46 -0800 Patch series "mm/damon: three fixes for idle_time overflow and damos_walk() hang". Avoid 32-bit overflow of idle time calculation in DAMON_STAT, via patch 1 from David Carlier. Fix a damos_walk() hang that can happen under certain watermarks setup and a watermarks commit internal state overwrite issue, via patches 2 and 3 from Yifan Feng. This is a batched reposting of separately posted and reviewed patches for being merged into the mm.git. Refer to changelog on each patch for changes that were made before this reposting. This patch (of 3): On 32-bit, the region idle time in microseconds is computed in a long before the division to milliseconds. It wraps once a region has been idle for about 36 minutes regardless of the intervals, so the cold end of memory_idle_ms_percentiles reports wrong values with flipped signs. Do the multiplication in 64 bits and divide with div_s64() so the sign of recently accessed regions is kept. Link: https://lore.kernel.org/20261123150049.81317-1-sj@kernel.org Link: https://patch.msgid.link/20261123150049.81317-2-sj@kernel.org Fixes: e5d2585d9e85 ("mm/damon/stat: calculate and expose idle time percentiles") Signed-off-by: David Carlier Signed-off-by: SJ Park Signed-off-by: Andrew Morton Reviewed-by: SJ Park Cc: Aveline Noir Cc: Yifan Feng Cc: mm/damon/stat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/mm/damon/stat.c~mm-damon-stat-avoid-32-bit-overflow-in-idle-time-milliseconds +++ a/mm/damon/stat.c @@ -129,8 +129,8 @@ static void damon_stat_set_idletime_perc accounted_bytes += region->ar.end - region->ar.start; while (next_percentile <= accounted_bytes * 100 / total_sz) memory_idle_ms_percentiles[next_percentile++] = - damon_stat_idletime(region) * - (long)c->attrs.aggr_interval / USEC_PER_MSEC; + div_s64((s64)damon_stat_idletime(region) * + c->attrs.aggr_interval, USEC_PER_MSEC); } kfree(sorted_regions); } _ Patches currently in -mm which might be from devnexen@gmail.com are