From patchwork Tue Jul 16 17:51:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13734724 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 10CF2C3DA59 for ; Tue, 16 Jul 2024 17:52:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 91FE56B008A; Tue, 16 Jul 2024 13:52:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8CF8C6B0092; Tue, 16 Jul 2024 13:52:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7BD7B6B0093; Tue, 16 Jul 2024 13:52:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 5E00E6B008A for ; Tue, 16 Jul 2024 13:52:18 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id D12391206C5 for ; Tue, 16 Jul 2024 17:52:17 +0000 (UTC) X-FDA: 82346359914.05.67ACBF6 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf12.hostedemail.com (Postfix) with ESMTP id 36F134001D for ; Tue, 16 Jul 2024 17:52:16 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=WZFuk6Fd; spf=pass (imf12.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1721152317; 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=3GWH+MsXGjYJqFaA3mzZNoHrwpyoo47eRklLK71Rm6Q=; b=Qu5vLpqVHqAtAwHnNAmjKml4xe6CNv0n9G7R2ABH11QkJ6gvV8c/Cxi5nuB/J05ntFwW8o qAKOoZ1PXg+evo4dviDh9Voi72PTYTEveEVEil3RFkxhrL6RJhzGZ8PcQZw1yuWPLgA9dL d80sNEUpY12h41uyfvNWtbwt4XJuN7s= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=WZFuk6Fd; spf=pass (imf12.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721152317; a=rsa-sha256; cv=none; b=uxA0SCLCOKl//dzj9ujx+TLJMBHsyW+H/VCULJlT9NTwRNI9S70Ghrz8LsVJfsINqM52tU jew3DSt8ztcgMqYHJ1CqckQXX0FR08jjjx2FFL5wsjxKEoabHfJMoKwnciOLdFGQf2ZCho VewkfBTPoxi7oKxhX+UMD3JSmyAYNdc= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 2CE93612A8; Tue, 16 Jul 2024 17:52:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 615F9C116B1; Tue, 16 Jul 2024 17:52:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1721152334; bh=3INfJTBuIGPGIxdF53Rc/9nUYk4n6kQ4mowWADu56tE=; h=From:To:Cc:Subject:Date:From; b=WZFuk6FdDQEkzsYkBlCgHKnPQIDagWQ30YEHBH9MGPXMIThAsPRpBYakiokDLaL/X rMmGRVFhlHwxwyWqc30cgxF1im+jcBG0ffTxe+LhZ6hSypzt9fJHPfiknvWV5MGkSh iBX5251Xad6ujunkUiT7E7sEs1YSixB1Rn3qHVVOxi2PmhJCH/tkoBYmXAhMtfr6oM EQ6oGvtG1NjLnWKT8OaLzZl2dAAJBJuDqwMqhKn7upOvLZCrwLjYj9d4qRnU4Oi6eI 5vyq+iK9hUGJnIXrtVcFiyjxqjIt/+hh9qDEwfwaqxDWuEF+wx6KUgI4j4D/fqfefv ji60aKb1P/itA== From: SeongJae Park To: stable@vger.kernel.org, gregkh@linuxfoundation.org Cc: SeongJae Park , Andrew Morton , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 6.1.y 0/7] Backport patches for DAMON merge regions fix Date: Tue, 16 Jul 2024 10:51:58 -0700 Message-Id: <20240716175205.51280-1-sj@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 36F134001D X-Stat-Signature: ye1yhhoqwes8sx75dbyixfg51g76ix3n X-HE-Tag: 1721152335-358244 X-HE-Meta: U2FsdGVkX19XS/Lkbo7G4ivBs+rhZjf9i7GzIxxVztN0AJPK5oHdZrnIrGi2dKx2mSKM/aJwg7tZabnX1Cc91RMOAjowmzFOqrPEW8CFk55mq9nQikMVEXOeSQd3w4cxqbTOGFrZHdgGI1vqdKuK/Cf2YzNsQ6yeAyXFg1UqtKTcUGqip7dCNjCgcjbLwILtVe4QtFFT1/XROslTySxjH5HUXoyU6PpHdd48XD7cLiZVCvx89vNOkGR7zaJ/HwUGDb7D6ayNogL5eB8D0IyJ8h3lIovxwK+h6DIBDXOSRzxN2u8dXcjYMWri+w+xp8TVsuAni0CVpPq03EDpG/CJjyP5pE3da5cdG86vj18r+RTnIHT9RtuTGcoRfaQzO2ZYF47dfXMMJCntTLLyyZW42zkx2cuH7UhzmIg26kO0I2hdGDNgv1Fzhc5xco9ubEUbQ0STgRX93xGuwsbtlPQbzsQQ9b1OJbCglgR6bsQrG4pQpDr5NRRqigvD36mCy3s3lFAiUvK3waDzn8c71d+9Aa7XSYmNPWPOgH70ETUsMacQBqw7okounx0CATN33mbjfHBQ4OadCx+F+Wgcozva9Ak1/57RX8oMPhvXhxFKZ624PA6zN/WE0moEifqc2AH2+XbrNIx6OGfBqk58kwGyb/lAFcWlxoMXD/ac+sgMz6CLfihiTVxya6PIPrEnfSmTAePneZdMqnmNSE6d0Jkt5VpYKH3Q/NYtPZxcMv3qEcn51s0BaT+Za9pDJju75F1lMTGLalz9wFzGuAtoScyVqBL34B8YjOq9V+YVL5jVM2KaL3wpAZF3K09r4AGUsOVlLdAkwTRb8A6PjQPLppEmDzfw37XR4urW/Bs1C+/STgTLlSCfEq+WAC8h/yXBQDLryHu161wl3y/FkAat/3A/59yVuBgpRI88/H249cbyVezy9KXlfeIuqor4sjHlnBY/JqhGBVq4a3gjQc+AMXK cE4KBiJa SG3mFlbz3I52gl+HzkKk4xP+4uiJPTYgLF22BayBPM3XCsuqTuqi9FQbGYcYR+gBJnKcOn6tiSDHvsT3H3BuWcOgNDS8OU5WXb2uFiDFg6k7BF/dCiUrDpyIs0B2TB3IfPC0MAG+8xbN22DOzegN/+Ow8h+wLZfSD7r1mFsFvAk635ziFz3v4BT1pybrMZhplR/UIrBp4Re35J2x2Y7or/qgZeroXpl9eoU62nitl1GZkxRbcol00A03E8BS2XOdxebGJGz6Z/BqDu4Y= 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: Commit 310d6c15e910 ("mm/damon/core: merge regions aggressively when max_nr_regions") causes a build warning [1] on 6.1.y. That was due to unnecessarily strict type check from max(). Fix the warning by backporting a minmax.h upstream commit that made the type check less strict for unnecessary case, and upstream commits that it depends on. Note that all patches except the third one ("minmax: fix header inclusions") are clean cherry-picks of upstream commit. For the third one, a minor conflict fix was needed. [1] https://lore.kernel.org/2024071519-janitor-robe-779f@gregkh Andy Shevchenko (1): minmax: fix header inclusions David Laight (3): minmax: allow min()/max()/clamp() if the arguments have the same signedness. minmax: allow comparisons of 'int' against 'unsigned char/short' minmax: relax check to allow comparison between unsigned arguments and signed constants Jason A. Donenfeld (2): minmax: sanity check constant bounds when clamping minmax: clamp more efficiently by avoiding extra comparison SeongJae Park (1): mm/damon/core: merge regions aggressively when max_nr_regions is unmet include/linux/minmax.h | 89 ++++++++++++++++++++++++++++++------------ mm/damon/core.c | 21 +++++++++- 2 files changed, 83 insertions(+), 27 deletions(-) base-commit: 291e563ecab1ea89c70172ecf0d6bff7b725d3cb