From patchwork Thu Oct 31 18:37:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13858300 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57B1BD767F7 for ; Thu, 31 Oct 2024 18:38:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B07E16B0082; Thu, 31 Oct 2024 14:38:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AB8266B0083; Thu, 31 Oct 2024 14:38:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9A6B46B0085; Thu, 31 Oct 2024 14:38:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 82EC56B0082 for ; Thu, 31 Oct 2024 14:38:04 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id EAD771418FC for ; Thu, 31 Oct 2024 18:38:03 +0000 (UTC) X-FDA: 82734755628.08.C8BEBDB Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf24.hostedemail.com (Postfix) with ESMTP id 806B0180002 for ; Thu, 31 Oct 2024 18:37:58 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ao7+6tAF; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf24.hostedemail.com: domain of sj@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730399826; a=rsa-sha256; cv=none; b=4G7CO4F6hTJHpcRL0NvlNeZROgHJgm9oDKpMC2lSKgG4Fcj27nHxW3hgvnnTytyu1pKLWT x5F4hoK/U995QyLuSPv1SVAocyP+u1aGk4u2bXA2lJI0TqHWXS6CqKz/f0B+HAR4XkXSvm CR0mZRwDk8B7iy0MtmegOq/CWMNtDIc= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ao7+6tAF; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf24.hostedemail.com: domain of sj@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730399826; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=agwFxOr6PwU0RhGAkg11MP9Twtj3wWjWGqSphqi7Mo0=; b=gJ/tOsOJqdpRf4+VNrWdhIm7CrIvb68tD2c8zvMw/8zj+ThQDq9hqSV55WsOTYbjTVHklq IpVQYEbmE3RETWoymd/OW3KEwTwxI0HxsHJebWH0+OzgkLExqNYfstLfY4CECv907CzEpu h1N1SUnFyuwLKZz83aIoEwt1+Ky6Hd8= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id EC86CA42D4A; Thu, 31 Oct 2024 18:36:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22E7DC4CEC3; Thu, 31 Oct 2024 18:38:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730399881; bh=qecJ0qHrAeujnhyF+dduZkCOL4K+wkfdthsWnoxyKR0=; h=From:To:Cc:Subject:Date:From; b=ao7+6tAFmxFdXzIUpaISgQipbkO/HBP5KElukkh5rvJzabrTA7LbFJZXtivIV91cr 7egNniWWyOcj2YiAwE6pGAKAiJ1RzRuJvPv8ocIqnomjEuAvjPuzpJ6IdW9pxD+WLs rylYOxlMIRzEKWEFapimd1GtXzv6Ls9aBSECqRaXu4HGnjgmXOP5C1SzqVno8DPBxe R9sKYTJSDBmV3bLxdP2OewcnVQZzcQWYSSRjjEASoYiIIvKdUmDwDz2tZ23upTd8os wy3kaM3oOzwIb4OtJmatO8hKtb+0TmKZGj7R2H/Ov2jdfH6KAbG6wlH3bkPJQN5MBY KbJlO6aGz68Kg== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: [PATCH 0/2] mm/damon/core: fix handling of zero non-sampling intervals Date: Thu, 31 Oct 2024 11:37:55 -0700 Message-Id: <20241031183757.49610-1-sj@kernel.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: 806B0180002 X-Rspamd-Server: rspam11 X-Stat-Signature: kuhg7id4g8tnh6x5za7ti4o3fqxukbcd X-HE-Tag: 1730399878-824670 X-HE-Meta: U2FsdGVkX1+HYZNwOhd+VrtMhxtGtDrxgbm2Ace6MWRc2zIUQoNHyqzxQTYLwLZPG3+bbiVl0sJ1iQ7JjJQZjxZAnwH12/D5FGgXWGfFBtNENN1ua3zNg1KEROGKGhvOU64322PP5QSsRybvfU9o+BzX8bLWkw57M0DiZ4BX8nvFoQiExnV5aDzk+r1vwdzC4gckcahPqcUfThZvRbqAYQeBLX80WRz6Bbee62/fGN657jDWO1uEStmXvda6jCtUXTJdq2jjedw2kSDiDwa0KJ51wdaA+OW2A3FLTTeeQA9nlcvzH+qHb87d0sCKMPYwYihIO5+XrvGWHNI2EcDBXjHmzvipr2oXTtcj3PoSUxUt/Wc3cpBOK4VYevjYmacK9z3ftdkxupGWIaQTpAXCX6U4XpjLz36ZtimN0CWAZLDJbrruFMtS81Av/dCEQ9PtJTMajPkDyFbo4mRbbWUu8e0Oy+e4ZbYfmk0XqlhJFSiRTWBMk/EY5aKH5M4sCQQaw18d+aGzCcbfLHO34rNa0sUWHPjUQqyeCJ5yk/EpT41RBIWiZN9ohBpF8ff0KnoYqWSQnShMYfM/XA1FFOengsx5vz7tnmrwnP2TZn/vGeBNK2iX9qx4860sa7oYNPbHtVqgHU42bDUvCw0CZb760lgJ/ATeu3o+gs43KCa+Aa6XdqUNoZ5TPuvHGpYtECSglDAg7itWLf8RG6yavl4N+AuDXbMHclRaax7qZnvEot7HOzCmTUZfF96fIqrmTaWdNlULh7tWEz0eqO9vcW1JpEkMwvJcNPKEsENsSj+mMWo1xyEClH4KCyfPpWyAtrDHdL30SWIwR4sHYBlzzVad+9JTYiLfs5r58dR9Knx6sMpS078mOMO5lk7SPW11GfnVJsLXDeRLnbRp8LSRg1FaCUhmhCYG02CoYL2vxsjzpaVL88Wx077uvb/T0Mef/f4l0XDGOdBZV8e64TJGfFa +1b68Yv1 rYNlMlmEF38HGE9f4Ed+kwObpvKjajor1TRXqH/nYyx9wDUJ3+IAjPki1vFCcyzOOsuSsbeGUXtJATE2+sCJKiYt1ZZv1dXnEJreu59CgcOWhJGxZPxG7ei7mdYXTG90Vxfk0JHu+AdH2krmdmrcZF9TuGgrLbRp8WfCqHT8EQYy9xFT8qseSk4wj/oVvbJ+jAK6G1iDHiEycMFc= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: DAMON's internal intervals accounting logic is not correctly handling non-sampling intervals of zero values for a wrong assumption. This could cause unexpected monitoring behavior, and even result in infinite hang of DAMON sysfs interface user threads in case of zero aggregation interval. Fix those by updating the intervals accounting logic. For details of the root case and solutions, please refer to commit messages of fixes. SeongJae Park (2): mm/damon/core: handle zero {aggregation,ops_update} intervals mm/damon/core: handle zero schemes apply interval mm/damon/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) base-commit: 0c9ffe1412203c72280f67567bb53200f4de44fb