From patchwork Fri Jul 26 21:56:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 13743195 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 59439C3DA49 for ; Fri, 26 Jul 2024 21:57:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B09706B0098; Fri, 26 Jul 2024 17:57:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A6A3C6B009A; Fri, 26 Jul 2024 17:57:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8BD0E6B009B; Fri, 26 Jul 2024 17:57:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 61EC16B0098 for ; Fri, 26 Jul 2024 17:57:52 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 0AB0FC0173 for ; Fri, 26 Jul 2024 21:57:52 +0000 (UTC) X-FDA: 82383266784.18.EB21B60 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf26.hostedemail.com (Postfix) with ESMTP id EA93A140014 for ; Fri, 26 Jul 2024 21:57:49 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=HNJiSszU; spf=pass (imf26.hostedemail.com: domain of frederic@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=frederic@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=1722031019; 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=N2wDk2Gcd9+BquURlVjDlsA41ANtNBXVgDegm9qEKUc=; b=2DWCSePiXEkmqwaLI2voeY32yNw1zyl0ef3OEb5N22JqYNjXIZisOmaCi0jN3btXhpFqpt qBEbt2NA3BeedzVHsofjp3d9TJelIJMlAOUCsTu+oOpsnZQO0gRPGvDawQ8lGVwlAm2a9v oacnl/Io1e7hylrbFq6faIhMkZYOVqo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722031019; a=rsa-sha256; cv=none; b=PF8Ci4TQl0YLbjyTgQuGiteuafQtUq4tfrmuynXIomtGRLE4ygKz0D8HGVmHJIxlCb4f9E lMVhdg2oS13OzasfTpYdCFHtcWe2hfAkOgprr6vVbj6wjM7gAL00BpHRZ1d2T/tRWIZeuI 4OI58DnEdEPu81Ycvcve216MMpEzvBs= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=HNJiSszU; spf=pass (imf26.hostedemail.com: domain of frederic@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=frederic@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 64454CE1953; Fri, 26 Jul 2024 21:57:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECEAAC4AF09; Fri, 26 Jul 2024 21:57:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722031066; bh=xSTwda2GjtC4wyMIao/A441KBqg4odJRHj3hK2x1g+0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HNJiSszULYtzhaeEVutUpqJehUbmWxSB6jq8VWOWPfAZdbHMxbimJX7PAPIKb+rCX W52rkj7eh6tAwyR8729dwXxsywgY8xzA8VBFr+v2kTGuMnpKDvsv1NhQBNyZXe5t0+ 01bV5vKyjTeG1oCaskaQOhyWG0qKuvAVy5laatvcHYtQ5BlQE8ER+P3CHL5deVon20 /J3e2MFPcvAexLrmDbabvPFF2loz01wv2FpsqHyCNxkF/0bpaB4P0ISCX/bAd7HSex ZUsqxDXFzSeoxk0tsvawONxFpR1xpWqnzoXRtkGhxX2Kqohw7My6WB+nP6z0KMxwOp LSSFCfUmNrGAQ== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Michal Hocko , Vlastimil Babka , linux-mm@kvack.org, Andrew Morton , Peter Zijlstra , Thomas Gleixner Subject: [RFC PATCH 16/20] mm: Allocate kswapd on its node Date: Fri, 26 Jul 2024 23:56:52 +0200 Message-ID: <20240726215701.19459-17-frederic@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240726215701.19459-1-frederic@kernel.org> References: <20240726215701.19459-1-frederic@kernel.org> MIME-Version: 1.0 X-Stat-Signature: 65859e15csroqux8be4uhtk5d94twr3s X-Rspamd-Queue-Id: EA93A140014 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1722031069-261216 X-HE-Meta: U2FsdGVkX18rzQNEKaTO3uD027igt5YKftpNtWHtYb55vY6gtd7GZrxcCAbiJTnqvMTt2m/A9D5P9PIYitI1o+eF14IaJ/lug0ACgWEBRlHdOEfe1OEsQ47oiHUlxeMFKwjjLTWA0FNApuQvKfOi+DdDpSIOa7v7ZbjoMpLJcOc+7ST/8TGbWmL0XmSbuktdI9Ed4ElvzR3R4koTTW50MVlaHUk2KX/ZpqCT2NjbS3dc4cpj+vEWyigVxVoemQcb2tHE66cfqRR8Fk7XCf3hKdw4Jn/iEFcwk0ayPKNxGPl3co0a5Pfaon/w3i2+/buja1toNkz2iidtCnchwdLWEawgNGKd/Abj/6Jgp9t5K5ZKAZZShz0ismR5uPv+Pi/v4QO4OGoaajyLfvClqD6FYeZ3EOjNrXuKWgPVNoDfq1Ks/k93/9cCtVp8bDm9W7toWf8gX9Vwyu7WMwAA3Sndy/RIlndLbkU0lpNEjjjPR0lENTen3kPPvlE+7YQPHByfJkQX+f2aXQCTplZYe4VIE5nsWtmr/DNuxLiEPVBru/AcFVhSXm1QsYSFsKZnWSQHPpJqhGnCSqWwZQdBydqFMnltHI8JL3o+mZ0v5JdOkoShQieNwQu+7w0NHtEMwR7CtP6QjFKwJjJSkZ9UP29i6ZlSxj0uIyZWHfn1XN+MeHWkMMx7Z29pwxUFugM5VPWvpQ09hPPLsHl74Qryt2KNbVoyUmU+8pEW1ZopOcjymQH39L58pBWiRL5b2/wkQuVsmBRG/7R9df6jKEs70fXGqhTwquJ+t3I8W4W7Ls2EQoi9Fq9XKQVhfUdXlJECTOS4NRMzfCn7ozAyRcu/isbmgA2bRDgZq9SG7whX+lwWhIFK29M24eBF0YDU0Oa2+KHYoDvZ4M1HeC6lGTsufvXE9xVLbs9bBQhHnkcDZCTwKvQEWiSIrRyORyIHJ6cWRzk1MmoGMXO8x5qIIx3FVZ1 TD5SKk1z GAphRdO0rD5GF5yFZufTA+GufITMjyA73FhE+J0sIrIC48ABsoFKIlHKkt+EeT2tlHMnbidIRqnTpmDQEx6GcCxyCdfK3FI6Bfi6gORXPLnEO2NtaZCZw4+8ySSNV/y5pLXgsT6iuTFiYACr6R9cYkB4ptlh7DXE0zqhJorQP5Za6hkbVfPbxhYrVXB/e6iI9opnbyQmnzkI5HRUdr6zaHB+2i0Qg+oLwDAvDHEFHBaVyr19Ax/EG5IgIbtxdxy8aJ44JB777Fdup0vI= 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: kswapd runs preferrably on a specific node. Allocate its task structure accordingly for better memory locality. Signed-off-by: Frederic Weisbecker Acked-by: Vlastimil Babka --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 94359a893b4f..adf8c1e7e89d 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -7284,7 +7284,7 @@ void __meminit kswapd_run(int nid) pgdat_kswapd_lock(pgdat); if (!pgdat->kswapd) { - pgdat->kswapd = kthread_create(kswapd, pgdat, "kswapd%d", nid); + pgdat->kswapd = kthread_create_on_node(kswapd, pgdat, nid, "kswapd%d", nid); if (IS_ERR(pgdat->kswapd)) { /* failure at boot is fatal */ pr_err("Failed to start kswapd on node %d,ret=%ld\n",