From patchwork Fri Nov 26 14:50:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 12640939 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 0CEFBC433EF for ; Fri, 26 Nov 2021 14:50:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0E4E96B0075; Fri, 26 Nov 2021 09:50:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 093416B007B; Fri, 26 Nov 2021 09:50:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E9E746B007D; Fri, 26 Nov 2021 09:50:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0214.hostedemail.com [216.40.44.214]) by kanga.kvack.org (Postfix) with ESMTP id DC75B6B0075 for ; Fri, 26 Nov 2021 09:50:35 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A0937184C2161 for ; Fri, 26 Nov 2021 14:50:25 +0000 (UTC) X-FDA: 78851367252.14.5CF8516 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf14.hostedemail.com (Postfix) with ESMTP id 2ED9660019B0 for ; Fri, 26 Nov 2021 14:50:24 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 368FFB827D5; Fri, 26 Nov 2021 14:50:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 446D7C93056; Fri, 26 Nov 2021 14:50:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637938221; bh=GiaptIVWd8QNsuTNopHV7m08Achws66EMxuWiX5Oqr4=; h=From:To:Cc:Subject:Date:From; b=KIhTRDIUdHPRj+ZyZ9Zy7ATS7SKOJCyB6Q35AY0W9iAejXLR73QmVeUkcWTbx9VJw N37YvVf3iwdDSHj+Y7a5uloZ7IbZgTiJba5Wv+dXLBhXSEusDcpWmt3B/fg9YjxKBQ +KPiqDDLHt+KlMhqy5FLjQEbMhm5LKw5v6LAjyRAPbzvrfXQGBeano3RvciZWTgg+u FLSj7TRUbEVLk/v3AkJQZJuxiKfP++wqvzcXQ++HxyISABQmsbHwgGGxBabid2+tJQ rbj19ytBsGx23yhKsywgXQhxzfBuMEX72XxenWVdqxrAJ542QGblfby1Dq7gXZxM3P Gm7Vp2ZBOtePw== From: SeongJae Park To: akpm@linux-foundation.org Cc: oleksandr@natalenko.name, john.stultz@linaro.org, tglx@linutronix.de, linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH v3 0/2] mm/damon: Fix fake /proc/loadavg reports Date: Fri, 26 Nov 2021 14:50:13 +0000 Message-Id: <20211126145015.15862-1-sj@kernel.org> X-Mailer: git-send-email 2.17.1 X-Stat-Signature: 3x1t9pk44ihchrdfn79hemedxwfddo9s X-Rspamd-Queue-Id: 2ED9660019B0 X-Rspamd-Server: rspam07 Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=KIhTRDIU; spf=pass (imf14.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-HE-Tag: 1637938224-646875 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: This patchset fixes DAMON's fake load report issue. The first patch makes yet another variant of usleep_range() for this fix, and the second patch fixes the issue of DAMON by making it using the newly introduced function. I think these need to be applied on v5.15.y, but the second patch cannot cleanly applied there as is. I will back-port this on v5.15.y and post later once this is merged in the mainline. If you think this is not appropriate for stable tree, please let me know. Changelog --------- From v2 (https://lore.kernel.org/linux-mm/20211125160830.30153-1-sj@kernel.org/) - Cc Oleksandr (Oleksandr Natalenko) - Add 'Suggested-by:' for Andrew Morton on the first patch From v1 (https://lore.kernel.org/linux-mm/20211124145219.32866-1-sj@kernel.org/) - Avoid copy-and-pasting usleep_delay() in DAMON code (Andrew Morton) SeongJae Park (2): timers: Implement usleep_idle_range() mm/damon/core: Fix fake load reports due to uninterruptible sleeps include/linux/delay.h | 14 +++++++++++++- kernel/time/timer.c | 16 +++++++++------- mm/damon/core.c | 6 +++--- 3 files changed, 25 insertions(+), 11 deletions(-) Tested-by: Oleksandr Natalenko