From patchwork Mon Oct 14 08:22:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anna-Maria Behnsen X-Patchwork-Id: 13834324 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 23FE9CFC500 for ; Mon, 14 Oct 2024 08:22:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 75A3A6B0083; Mon, 14 Oct 2024 04:22:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6E18A6B0085; Mon, 14 Oct 2024 04:22:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4E49F6B0088; Mon, 14 Oct 2024 04:22:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 2EDDD6B0083 for ; Mon, 14 Oct 2024 04:22:49 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 69A9A1A0C48 for ; Mon, 14 Oct 2024 08:22:35 +0000 (UTC) X-FDA: 82671516774.29.1B5105C Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf09.hostedemail.com (Postfix) with ESMTP id 6F947140004 for ; Mon, 14 Oct 2024 08:22:42 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=Tdiau+xY; dkim=pass header.d=linutronix.de header.s=2020e header.b=2py3lShc; spf=pass (imf09.hostedemail.com: domain of anna-maria@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=anna-maria@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728894120; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=hzqGiPKzKOr/Twl2K0C7DsL38YQ5/v1OOfZz3SGMgIo=; b=LUYSFE12WUTR0rJVBdBCVhJdWhOIzD+1frBrg72syikV7KFosuQn8+2j/ZXJ0dbKvbReHu i0fSUJDGwgFJEb5iMNEm1nLcnejzwspWxlK76MKCy9Ews5l+T6/iC2/7wYbJeBUNAPvyoX dF8GcrfnYDQ58u/+xX2nnYW6gWLuuY0= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=Tdiau+xY; dkim=pass header.d=linutronix.de header.s=2020e header.b=2py3lShc; spf=pass (imf09.hostedemail.com: domain of anna-maria@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=anna-maria@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728894120; a=rsa-sha256; cv=none; b=DrvzQzHvotGpToPJt1HEc15LYojv1lluLHpGAF6WqlzNf3fE3sk7wDkLzJyk3gu5TRuxwu VRLEKcRlYsNwD1DIFscu2SxgbcEq9msKuUmZFYxj8+ImUl+OF4AUilRytSyOvccDCT61e9 skjGyjALLwODaPDUEELXVDX4E+y1Wkw= From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1728894165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hzqGiPKzKOr/Twl2K0C7DsL38YQ5/v1OOfZz3SGMgIo=; b=Tdiau+xYkkTqIlZOuU7QbocyN3mWZ5cMg+9z7mvzIBXeJf7/egZmEdNUT4osS0wH+O9TwP NYrJ1281gIYm8V8xkpg3g+dd4Ye8HQ0xzLYVpkZ6LwqqpAfDM/WjqjtQhDVDxedtfETgVM O4tLZOCTFe1nf0EkS7Cv6Wha8snd6oQKk30YpOYTfJf5s4B22LOoFxlstGJUDZS2jwigFm VQGXw177tW1TOaGNEU18C9l3fkbc8iaXerdNhqNCbtfqurbpLyVS4ZaRRR5+k3izPPEjKW W8Ezpsyc8MuLlSgGao+CIXHSTK3p00J579HFm818pMrAV90NUAv5GQERFvFV8A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1728894165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hzqGiPKzKOr/Twl2K0C7DsL38YQ5/v1OOfZz3SGMgIo=; b=2py3lShcqxXqMh3SmT3Lr2IIWwIdLZub4OBrE1vPJUwleB5lhSTj/03xbr/IsU35J0MH0+ e5/NuwaJhnQn7zBw== Date: Mon, 14 Oct 2024 10:22:21 +0200 Subject: [PATCH v3 04/16] timers: Rename usleep_idle_range() to usleep_range_idle() MIME-Version: 1.0 Message-Id: <20241014-devel-anna-maria-b4-timers-flseep-v3-4-dc8b907cb62f@linutronix.de> References: <20241014-devel-anna-maria-b4-timers-flseep-v3-0-dc8b907cb62f@linutronix.de> In-Reply-To: <20241014-devel-anna-maria-b4-timers-flseep-v3-0-dc8b907cb62f@linutronix.de> To: Frederic Weisbecker , Thomas Gleixner , Jonathan Corbet Cc: linux-kernel@vger.kernel.org, Len Brown , "Rafael J. Wysocki" , rust-for-linux@vger.kernel.org, Alice Ryhl , FUJITA Tomonori , Andrew Lunn , Anna-Maria Behnsen , Miguel Ojeda , Andrew Morton , damon@lists.linux.dev, linux-mm@kvack.org, SeongJae Park X-Rspam-User: X-Stat-Signature: cwhazw8ds534z1jz4siehngzturx6yyt X-Rspamd-Queue-Id: 6F947140004 X-Rspamd-Server: rspam11 X-HE-Tag: 1728894162-1202 X-HE-Meta: U2FsdGVkX1+FqT/94wum0nMSoliwVTdtHYkHJYwDTVW/rRg3fQp8FW/QrHYye/ynLyfqeLmvpwNk4H0Y6V+6r2YwnusagX2Xg/hsMebOO3QX9nceEwSiZGDgV7o6vR0PyFOv7qvHZJP4fbuxAnh/w2mfQAlJd9Btt/uIO9E0iRbH0vh8kI7vtnwf0HA7Qib3R9swSDbxDkrEG+VXrsGswAN1O/V6FG2fK4ZWLTll5yDLsGZ/+raKjJzjkOlJvjnC1inTU4yEvLAilNMDmkOrojLi+oJF7GbB8vO878rTNvlLfqMuade19xTAjiUoU3D8IV9NyY+Th7zm593k3j2ob9m9sIDHhgVjKqyLcU335zanQZNYqlkwocTlaiBbqO4l/Y9C5ow2bAF92Of0/YPklRc7eu2WAaZtZXUeBn+FXLfWqgfN09ecbeoFySU1CDxZZsq5Vi3JPPEJcaudlIKCrS6LhF42syZyHE9f22IDamWXgxaRQvBautkR6QpON4IRU/M6fyTSDiX50eUuPvfi2bxTFZQlfuYHxomRMu2y0ddMoEoDKrctdnaFkBUxpIDA5ko/jCq+Q2cHkSULnDaBSSRZbONItPP9H9aewfdcHGznOVYbADEP63hBYVBj2QuWs4sx1QsZetSmUs2Bv9qoR+kMjkTUKOvKWMOr6pd4WcfEPCdBuHQmB1dn7tFbpr44M3EEISn7yvRz0WD/V2ClGCBQPYJbeWz8cLz0udLWKlHsrtuB7Lez2dEb0LeKH8KVaHNHhEyXrG7q6Z+Fp/9UDAsdKZbj+xFariTkmtXWxxhCegBptFQJDfEajrQx/AhmPUZAeYzQBVK7/sEJhHZVChm3IDoENTqTMK4wQCV3cpe3FT9w1XYs6hJWncE334GG6dGa5W6hz+STosdfJ7wvDwy8laSWu7w8plC5GMWFGf+p1PH3aUxWLUOfYFBFlHkBYAQNzmQxLsNZDEo5iyB a5H1viSn V5G2b+sb2uQWThDRGWARwT/Qm/g7s2tH96eUtlcvEFspUMraVEtYj9A/ndH6HgeSdhsw22qxaclmljBY0XSitEIq1LWjcPj0w+bLFxWrcmWy0fs6K1a7vVOJ3EOJZrDO6bJIn5hvyquxoJXOV6dynShkTvNyDM+Eu5FJb5hXtu2zQf5uBgBZJd77A+NL3ZkRBQFznXGBMAOn4QS7TKKzBA+t1YunsQNBFd0OJ9Avu4ku2LSJjqXDuJaY4JyF8NbwEA2XbxYvRyG7xczfDbQsBFoiZUj3DzCUfeD/dv2tRxAQuxqsOnJSqI98e6PWCQWrU11lDtq+gOLFWNJYHjhi90nTISymhVgOY3Bpy7+r5XXJcrbLYV7S0npvO43gr/Oe9ntWKoHCeyLPvzwd8I/LTdPgCqLktF+9X+jpN 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: usleep_idle_range() is a variant of usleep_range(). Both are using usleep_range_state() as a base. To be able to find all the related functions in one go, rename it usleep_idle_range() to usleep_range_idle(). No functional change. Cc: Andrew Morton Cc: damon@lists.linux.dev Cc: linux-mm@kvack.org Signed-off-by: Anna-Maria Behnsen Reviewed-by: Frederic Weisbecker Reviewed-by: SeongJae Park --- v2: Fix typos in commit message --- include/linux/delay.h | 2 +- mm/damon/core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/delay.h b/include/linux/delay.h index ff9cda975e30..2bc586aa2068 100644 --- a/include/linux/delay.h +++ b/include/linux/delay.h @@ -68,7 +68,7 @@ static inline void usleep_range(unsigned long min, unsigned long max) usleep_range_state(min, max, TASK_UNINTERRUPTIBLE); } -static inline void usleep_idle_range(unsigned long min, unsigned long max) +static inline void usleep_range_idle(unsigned long min, unsigned long max) { usleep_range_state(min, max, TASK_IDLE); } diff --git a/mm/damon/core.c b/mm/damon/core.c index a83f3b736d51..c725c78b43f0 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -1896,7 +1896,7 @@ static void kdamond_usleep(unsigned long usecs) if (usecs > 20 * USEC_PER_MSEC) schedule_timeout_idle(usecs_to_jiffies(usecs)); else - usleep_idle_range(usecs, usecs + 1); + usleep_range_idle(usecs, usecs + 1); } /* Returns negative error code if it's not activated but should return */ From patchwork Mon Oct 14 08:22:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anna-Maria Behnsen X-Patchwork-Id: 13834325 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 8EEE4CFC501 for ; Mon, 14 Oct 2024 08:22:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0C8A26B0085; Mon, 14 Oct 2024 04:22:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0525F6B0088; Mon, 14 Oct 2024 04:22:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DBF9C6B0089; Mon, 14 Oct 2024 04:22:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id BBD7B6B0085 for ; Mon, 14 Oct 2024 04:22:50 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 8D4ADA0C64 for ; Mon, 14 Oct 2024 08:22:36 +0000 (UTC) X-FDA: 82671516774.16.DF0E0A8 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf22.hostedemail.com (Postfix) with ESMTP id B7437C000B for ; Mon, 14 Oct 2024 08:22:41 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b="B/aSrdnG"; dkim=pass header.d=linutronix.de header.s=2020e header.b=S6JiLyI3; spf=pass (imf22.hostedemail.com: domain of anna-maria@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=anna-maria@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728894097; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=qOaH71wwpXdQZek5RpUCzVvDQCRluMekHdCjKOEhMjY=; b=HlwUgFEda3vWAP2aSSDpYqAyz+tIVykz4uyJV6llbiWEqZF3jKNOY95Y5pP8fWuDNsjtCq 6IVsl6U8sZYdzOiAugnHdDXQn0rYgloHvULRp1D+uMugmcn5Fbq5U650vICavzoZkl4eOz EZUHHnJA1YTJ3pB2K5Z6gS2T7BUqqTo= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b="B/aSrdnG"; dkim=pass header.d=linutronix.de header.s=2020e header.b=S6JiLyI3; spf=pass (imf22.hostedemail.com: domain of anna-maria@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=anna-maria@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728894097; a=rsa-sha256; cv=none; b=XjclVhjzeAEV6EstQ5uVIH5cKRzGPWBlOSCqhxAmAGbPJNIK6Fk/eicCA7Sz6vgP5wjX2a IHpEe5c0uMcHH//CXvqE5GBf+9Qy7sgRopJVOvx5vJIdlKVA2ySn9I7Kp75d6O/fB8I570 HQZrmB6XCb8fr+hVIkvE6b8HRTzLcEA= From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1728894167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qOaH71wwpXdQZek5RpUCzVvDQCRluMekHdCjKOEhMjY=; b=B/aSrdnG1hdrhqCf9Doxt53XdUEPd/DsqfCqfEtXm+sXaR4YxaOBvD/4G4k6gEJsLkPqNI vHi/uKunKriXr18pR5F29McrnstoIfhveWZg3Q9z3Lafph8GjeECPp6qWNwz+orsvPcojr Snx7csQhHtS1I/k/YSb+dPc2+vClJeJ/Z/M94B8lycT7WPEvSY3DnwB5ND44BUhPWtm7fc 5SbflHJua9/3ny+8zX2+wvL8ioeRogGZNozMCMjJDw9WJfWDlsKzeLlmGzBXOqcHiuQjDw Sh4zc4d6RRhGSRWRewxwX+yWhSDZeoxCFlye9hXYxSs2XZskPwA3I1nondd8+w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1728894167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qOaH71wwpXdQZek5RpUCzVvDQCRluMekHdCjKOEhMjY=; b=S6JiLyI3D4+gyIiCjKrWzIAm4jv71/fdJjVfoPCojjq13xGDDrzi/OlrF6cyHiZaMmx4Mf 8Fn1cpiVDmJEzqBQ== Date: Mon, 14 Oct 2024 10:22:25 +0200 Subject: [PATCH v3 08/16] mm/damon/core: Use generic upper bound recommondation for usleep_range() MIME-Version: 1.0 Message-Id: <20241014-devel-anna-maria-b4-timers-flseep-v3-8-dc8b907cb62f@linutronix.de> References: <20241014-devel-anna-maria-b4-timers-flseep-v3-0-dc8b907cb62f@linutronix.de> In-Reply-To: <20241014-devel-anna-maria-b4-timers-flseep-v3-0-dc8b907cb62f@linutronix.de> To: Frederic Weisbecker , Thomas Gleixner , Jonathan Corbet Cc: linux-kernel@vger.kernel.org, Len Brown , "Rafael J. Wysocki" , rust-for-linux@vger.kernel.org, Alice Ryhl , FUJITA Tomonori , Andrew Lunn , Anna-Maria Behnsen , Miguel Ojeda , SeongJae Park , Andrew Morton , damon@lists.linux.dev, linux-mm@kvack.org X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: B7437C000B X-Stat-Signature: 7jfort91yocoob7hmntexog3wzdietkx X-HE-Tag: 1728894161-419829 X-HE-Meta: U2FsdGVkX1860ZlE7bXeOn81dR4c1UU8Ys291u8ZPbfWAF7HdkdpD84CHUP6z92RI3yB1GyZIUXoIGv0JrcQ5pskOt5f9UL5cGhDXjta5zC3oD7Uy6okhKXEU7/aYRN8dVyodW5qBFaKeVl/PiPg2EjcYP342RteBeZF08BZZOupzoCRRSGkZrfcJ4zAdzPfco02Guzeu/YlTDLvYnt23nLANrEcKGHY2iOsEOmFk0mPvADfmjeCwY49OKcNAdHC4JuOw/ex9hIs6xvJLZLwMx/QRxyKYC7eKZ8A6e/8kFasSBIz70ACJO0roV4zjsJQ9Dc1cqPFt2Asq8JZnGklONpuxMBCoZTOCMcfgk35VGMoksDCfd31rv74HF4eDuTyJfnbfWKQ6opGubzqKQY2eXb8BCM44YZHTHtebDJO890YrOnyOTd0x2HG9k7nor714HvtI38Wq6c376OL8kf9Go8tbYYcLFVBUGXsD4qJaYgglrvupsnQhpUfg/vZQq0xBkp0rQE5QV0L6yT+6FaRCbBOTUkmg7zp09ft1EfAEgIng0sjphDD4tWq6JrLGYVL1lJ/G+HSBgjKmpCddulBkEUU8coJh+QfEyWP+4/VmPFzE0NcjQOnVOCyCoZsVeSKwwYJL7JEhN/E+pKNry2eke2LDWf/znXI+H2NAgWR2wC46C+UXZyGziRdStN0bcrTAvQ8yfhgVWVRlJ1ExYElzAISklELcqtDd1QGKtHQIKSs+UakWs7MiCryYEEtLtgTK4n2EnMqhL/Ug7SOG/nynqcc1wUCglBYbraQJAlSdpo1Hfrlj1AgYv6YOzUihYa8CThjENA4PaIcgqEfDEv6gkQwEkP+a6bGKaN3Pzvo+eT+Pgl+pSXPZnjXkzvrofll6rYssuhus4xJPb5hVeZzPTg/6njXgapV1AJlHfCJhuF2N6lt/rwyUA9UzlHmQnnIA618vmFDDVzD7+QsIyd OR0cssH/ t5T3Q3ab0hqR3rWgOYQacp/RlukViX9J5pelMqTE6YEe/i1ucTUIfsyWDJRScmUTKEKQBVfgVABAlcPUIoBIi734hYH30V8Ov8UUco7SVjHjgcUQVKe0duMSGf4waky+P41Q3W2R2WcPX0lUou5ZdZBPs7IFEt4YtJe8xIpeubABBO9vVdDIDvknh8jy0uZhyxuZPI9y1fkjN4uS3oYedqAegrfY8vMrSGuJ7ekEf/ahuJTQHOVNIbVJbDy+QnA0MG0crdHP9O3EBlBU/4m3U8gs3hYKxAARrFLNMXQV/bF4IRJyEN3XXPEJREah3go7y4DGmhk/hB7qd8cEyAMJ3rrf/3c/GC9hHpQZrcPqdNSNAb+wGr1IB4zAUb+/KyxQrsrGxDxvZxVAmqvFxkaFLHauX++SFTaKhKD/P 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: The upper bound for usleep_range_idle() was taken from the outdated documentation. As a recommondation for the upper bound of usleep_range() depends on HZ configuration it is not possible to hard code it. Use the define "USLEEP_RANGE_UPPER_BOUND" instead. Cc: SeongJae Park Cc: Andrew Morton Cc: damon@lists.linux.dev Cc: linux-mm@kvack.org Signed-off-by: Anna-Maria Behnsen Reviewed-by: SeongJae Park Reviewed-by: Frederic Weisbecker --- mm/damon/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/damon/core.c b/mm/damon/core.c index c725c78b43f0..79efd8089d6c 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -1892,8 +1892,7 @@ static unsigned long damos_wmark_wait_us(struct damos *scheme) static void kdamond_usleep(unsigned long usecs) { - /* See Documentation/timers/timers-howto.rst for the thresholds */ - if (usecs > 20 * USEC_PER_MSEC) + if (usecs >= USLEEP_RANGE_UPPER_BOUND) schedule_timeout_idle(usecs_to_jiffies(usecs)); else usleep_range_idle(usecs, usecs + 1);