From patchwork Fri Jul 26 21:56:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 13743193 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 91682C3DA49 for ; Fri, 26 Jul 2024 21:57:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DF1F66B0093; Fri, 26 Jul 2024 17:57:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DA2D86B0095; Fri, 26 Jul 2024 17:57:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA4FD6B0096; Fri, 26 Jul 2024 17:57:47 -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 7BC186B0093 for ; Fri, 26 Jul 2024 17:57:47 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 29EE5A0169 for ; Fri, 26 Jul 2024 21:57:47 +0000 (UTC) X-FDA: 82383266574.25.BF679DF Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf03.hostedemail.com (Postfix) with ESMTP id 202A720021 for ; Fri, 26 Jul 2024 21:57:44 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=EfaHtNlM; spf=pass (imf03.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=1722031063; 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:in-reply-to:references:references:dkim-signature; bh=W6L+GxnhanS+b0pfe5oO7GNFHU0ng/W46a1khHMCwF0=; b=zM6Op3X7lBq334dexXjcf2QlNihBfE2/FraLhSUlcSvhO1DVJa5hBWGxLfczPxjsBQ3y0o dj05rOsATjrlsIjnBBv4sUReb8GfOOEdiUtUwyevYJOnBILCTgcnCY1EoxO8RKjxoUr+Rl D9yGLVilESiTihOEFjOGzKuUAAmBYE0= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=EfaHtNlM; spf=pass (imf03.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722031063; a=rsa-sha256; cv=none; b=duPOBqYSNFLawG8EG5STqzVbIwiEEXyxTvFOmSk267Gr6w5+8zUu6Y1gFiMS4LbxlJH2G4 KFthlMnMaT3maJ5LAxHR0iH2uDdh4WxNFjyGy/qLwXLKoTxJCkP/vpyCRFEPb+XhMRh4M4 ODTxuycn8MR6kexIjMn/YDfS45dLQwU= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 9E7FACE195F; Fri, 26 Jul 2024 21:57:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A550C4AF09; Fri, 26 Jul 2024 21:57:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722031062; bh=0SibR5bQwBKFRBO45aA49JEwgVAnlIbZLSKlUtRYW0s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EfaHtNlMZlMJahhsPYP3XpnKrqeJqsjfxxstfWQNrL9lYhrDvZtANMo274OaJx/WR DK06QKky13O60roB5A1PC+pKD3hZucY4vdLhblwxyPKDFOePStfUXAM/+oCpScsUF2 VQHCBe3uZD8wqdoKdHhmwfxBAD00C1S76vldsuXXYD/yILvkN86vgtKpOVHSbLjCIo ixfo2steYAN967ul7maL36yPU0W2mRJU0P8dmMoi6Vzt6t/ObrFIeg0/+AxrxQFv6U cmkFLHddcdM3frJXp9chc8owG7UMLfzeBceiOIUjFtLAUGktjLI922jIcKN8lmkBz4 /9K0TNVD224dw== 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 14/20] mm: Allocate kcompactd on its node Date: Fri, 26 Jul 2024 23:56:50 +0200 Message-ID: <20240726215701.19459-15-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-Rspam-User: X-Stat-Signature: nj98xybo4pc7md38bh3549rx3uzthd8p X-Rspamd-Queue-Id: 202A720021 X-Rspamd-Server: rspam11 X-HE-Tag: 1722031064-565728 X-HE-Meta: U2FsdGVkX188bJfYsfBUap1kxmyDpU5AiuNGuGL3uW0/oTCN4PQ6H37VBlETOvvDETWgSVglna97GkX5Gazytl64ghPuYTITZsL5QcnxjielTDMn7aCphk/7ADET9xL5EivaMu2YTTIJAG4MWeYRpIngf7dYo7DsYa8CiCBDblbB5Jeq78YvjI1+Vro4LFevClNWNxZBUSCT27hiPQUXXMqd+lPyOLgKpiQchyILKBG20ueCjPmSca5l1kxT9eWJkKNscUe/RiJNul02pIYYuI3Pw/xmMcEpqUPUlxAkh2CP0OGmWzRfhaQhaoMulsQVU5h7VDPY3Zb2z72ol8wRJQ9hFBPOkaQWZ4uu+iZg7IP4KtbXgxLmrnl+bZ85tSE6/ga/zxr0OaXCkaIJFzhswKXAl/bOrq4BWOcRQ9RC3UMW1isSgeIfKxpSOG2QQTCrrquGWyHP/63r3YJEW3KiFUtJ68UjYRMQfvd16ZHBfyyyz8YSxeu4rcsS4MFewy+TCVOt7+QhlcOWU9VMFR/qoWmBFxloWeRKzOETjFw1kmm6cZmd6HO6Vquii1VK6B3YfAV4K0/dElMl4nxToGznTLt/uJeBDlOzfZfleCoRnIgw9GQxpoaAMdXieJKqXDhU9JgMMUuNJQOc/nS/Soz2yqy07EqrbICu2Gn8da+5dXnynUMJzqI/W5aALxGNc5Z2klgFE7aHXuk/0zkrbPkdrgg+GN3n73Qv1XEKs29hQXhm4jpNcBcX3RCYCKGV+SeeR6ehcQnC44pO0N+7mSocZh4cI1Bt/f9q8ODa68VXwZewvV/mFvlTQeUuAcQ43wXSQrftoUXJowLnhS9UYO3DJ/vIlxvPEQwDwVFlM3b9hYj3UQEjbHuVPkQaR1rll4AGDAdagq2dadGBDNxYLIUakD/fuaKar2bXNPWcRpT5pdvAoTHdCYr14spd6cWe8P/Z/x/zCNEhZs5wO9VbyD4 5sEBIy2m FMBNqGKOtH9y3zhbPwHvaaKicCSc5gx23b08On4iqK7ni3u0FdW7bOegR9VVOHiE0XmSSOf6dAPRvV0WdkUHeQlQkLmBj8CehnAb75cw4SlPnAAf1cOoSmC75puPkLgzVbPqsmInOEGi2WsE+fVvInmEtlZN1V8nhIM4Ps18hTmvnoczVy8nCCMLEJUJVxGPqoEUvNbdy4eq+6ikRvs71ZO84ktgW9PnVuYW+dAPZSKPAKRI= 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: kcompactd 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/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/compaction.c b/mm/compaction.c index 64a6486f06e1..dc4347c4e352 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -3252,7 +3252,7 @@ void __meminit kcompactd_run(int nid) if (pgdat->kcompactd) return; - pgdat->kcompactd = kthread_create(kcompactd, pgdat, "kcompactd%d", nid); + pgdat->kcompactd = kthread_create_on_node(kcompactd, pgdat, nid, "kcompactd%d", nid); if (IS_ERR(pgdat->kcompactd)) { pr_err("Failed to start kcompactd on node %d\n", nid); pgdat->kcompactd = NULL;