From patchwork Wed Jun 5 22:14:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13687607 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 F0CE8C27C55 for ; Wed, 5 Jun 2024 22:15:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 58F4F6B009C; Wed, 5 Jun 2024 18:15:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5173A6B00A3; Wed, 5 Jun 2024 18:15:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3909F6B00A4; Wed, 5 Jun 2024 18:15:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 141C96B00A3 for ; Wed, 5 Jun 2024 18:15:21 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 9ED7E1601C9 for ; Wed, 5 Jun 2024 22:15:20 +0000 (UTC) X-FDA: 82198242000.17.04ECAB7 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by imf02.hostedemail.com (Postfix) with ESMTP id 034C88000C for ; Wed, 5 Jun 2024 22:15:18 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=O98fWl2H; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf02.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.54 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717625719; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:dkim-signature; bh=ejEWcGqqh9AuEDwfKl4LY//C+GDXgfK5WkTzOJS38Gc=; b=VpNUmjjf/gsru3oDfH5tDCKUYg7EKfOMu/iz4hWeK5xqsOt0HIdGJhca5liN1xzrs4UZCU ++lT5N7oQPoJwdCevKTCD4hDXtcrlyRZ6F9ytKgFM1E+X37DzHLLDqJIoTOW4nFq8yYpzp s0mBZ+EiYS3NEH8jsluHZuZA+2vN2rE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717625719; a=rsa-sha256; cv=none; b=b/zqt5jh44jrFDhbccvoaErJw9W4Ec+9QLPkF0aOgPnehUVjcwUGOypm4ry6izVhiKd3yx au4hU1TGh980FLaERA9h/Ic6PfEgqE3GQzDe8PRSYZjlgOo4Pr8I8IK95LD1HEwkY8YEUK WO6S/YlwG0iD5Io+XgDhPGfje2MNPG4= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=O98fWl2H; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf02.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.54 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-572c65cea55so469651a12.0 for ; Wed, 05 Jun 2024 15:15:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717625717; x=1718230517; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ejEWcGqqh9AuEDwfKl4LY//C+GDXgfK5WkTzOJS38Gc=; b=O98fWl2HyaBxRpKq3fs9bbbOBZQSix3SFBJ4rbUfnLdVZj3UIWfoRFDcpnnJiR9pIh jO2QVjQ22l9fMeX14neKzZOLfjH8Tym9BB9CRUGLDRsH4w4v1LUgUL5OyOKAj1UjY/XC ws319PLnsXzXq1BMSbKYWObg4socAo7QZZ9obs9lpFPDkRUsTDDXcl7nw2Z4SOWEFqtb AiGrFyo4qSmOWhcanazzsSlIfVmvHMTFlpTTf1dDOBp8SvdBAOhD2z+hJXf+xeVJrEIn +z25ZmgJzBUB0DyGTI7WXn487lYTzP1WvflYOF5Cznb2FS8wN+LlRHzoTwHbyES19FDL 92dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717625717; x=1718230517; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ejEWcGqqh9AuEDwfKl4LY//C+GDXgfK5WkTzOJS38Gc=; b=TBM7pZIikzWpg0VlNdk3t2Z/kIfHI9pC6BsQwfeETV9nmqhNYqHMIHcUaSHTQCGaVz bFfWWQY4Xq4YvTuAxODdDGtDbwXdz/nj/AFfQXUhKlw1GeNcaCdEhNh8TxFMREYAZAqe DFneGi9ifUlDJ1nl/qupzqSUyOKtyUxy3qZewTCJSsBPqM9thVPuUqLMn7i1ofFm7Xvm Ih6EIvyFP9u9zCIoKtWu9KdL5j/HVR+qVp0Q3jx9Ijdj5tCc8yTrxg20ncamOOPlR7ul U7NA5AFcr87K3HVW0yKS1L9O3MLjsMZV6it1SzvBdfvfsejpc+hGGC0GlrPCeZxBC2zp Ph7g== X-Gm-Message-State: AOJu0Yyx6dZk+D7AhBu+1WE6qXUeR9yRuic8fgGLnuvkxhfPmrDd/GPR xnTGSk26hqPLqItx9AmduEUtnwAynhMXcRbBISH+b6BSspjSOjEU X-Google-Smtp-Source: AGHT+IGnoZaC8sdt5FcbW8NCue/BEtvzN8dFIR57xrZBJrgvzxU2IUMW6PRn7YMk/kXh+/MkhpZypQ== X-Received: by 2002:a50:d74d:0:b0:572:b83e:e062 with SMTP id 4fb4d7f45d1cf-57aa53cd286mr807503a12.3.1717625717140; Wed, 05 Jun 2024 15:15:17 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57aadf9ea35sm18118a12.15.2024.06.05.15.15.16 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Jun 2024 15:15:16 -0700 (PDT) From: Wei Yang To: rppt@kernel.org, akpm@linux-foundation.org Cc: linux-mm@kvack.org, Wei Yang Subject: [PATCH] mm/mm_init.c: don't initialize page->lru again Date: Wed, 5 Jun 2024 22:14:36 +0000 Message-Id: <20240605221436.24627-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Stat-Signature: 8177ki9rscs4bcfs3s7a6zf47pkh6erf X-Rspamd-Queue-Id: 034C88000C X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1717625718-454907 X-HE-Meta: U2FsdGVkX1/6giYEPyN4Yrr4cqUwMSket681r2mkx2q5ivzZ+lPQDOPtuLi4hNoAoVGP/SzV07YPgMTYfsabakjq+/LzhUaz1Sszhr5/Ik5/RPgOvIhQnP98Mb/fdqs1zQoL8RkZvlyXidmv+KTSCj3vC+hxzBe99oqspZCvOOhJIi3G4PP6TShybLypj9FGZU85cbVp6YHKQKYVHA24m29My0Bivn1WnwCE1lhM1fDm0l8wCkgxRI9olHKAfh5ATjrhdza9+fofEqg2jMVaKAS4iIzkQSP/aL79Foutfjh2eBXDXmsGIYyR14n6PnCMiaMH81Yb7QW6uuOPrQmmNZpzOrSXt9CQDadZbqImdVHcekmkb7U0XnioujhGEm2ORHC3ImyK4/77TGuASvl7NgSlJkOybpFTqqv4O/WnpvhtxebPlWPx9lZhZ9ISuKw88hc6KIaMeuN2gGcH15D+Kp4UrVH4GNO7bc9uVFL+DhRqCPqMhVvSNXGfJFglMmRW/XLAtbP0TP7AL+tGu5bdn7gkSZQDpC7cOddWgsJq1T4yE5CYF1vD8G907MFJCjG0MyK99GxZ3/oqy/F6CEAXg7jk5qEYO+mH8ouxq0a2Nt7r1K8Y/WmZOn6ZDS1jCUw70cA6okwPjbBtyDG57vL+5EEDjIWD7UhCX8Bb3J/taPU8/iCY8l6Nihe6OGH6+RI235ZocLXRony7juGlr5M/nMcCymnLWzmkgvn/0oRNfTe9jX2B8S/MsOUt1fYT7lNmsa4TICvy3Xwp+I66XnEgp6r13XgAFhlkLg2sTSj0mUrRuesvPTM+uijcmB9NeAqAuOukIIdmoWxWwhkyFgCfASl0h3G3BhInxOmcs7m/VbEP0MZ9bRPh2MOGGguXqAIlKm0sHPIBIs1Aetp9qR6OSG4IrJITiGaDHDHRMz4BWcLC/FGLIN7ApJUTOJr09zZeDAYixtCJfhO3Fp+kcjT fQxJVqYG wRYF/Eeq4kDxrh/pOF45T4esxguJovGUd61bGDuBHfyd682ghlwTuzlFpwmj1iM6hHJeHy10WT4fVC44v+r4n4qOKzaoiMwj5PzlwUsVlaRoaTNiBs10VvR8v05YZEvuAEeKCU+nhLUvo+tAWuLKlYv5DWroMNhXLSaVw6pPArHpsxNXPtXI4/PqbkkoC5hEtiWAxsPzAQppkVKP8UO7OAA/hupLOLLpJz3i4P0k32MN6YFx5k1U0YQ9pgzodWouTeG1BtZ5Wokqv1UxUt9gZZgBbpClGS4qMAapGCRWF3ME9sXFBDWF2fIhvrmNAK/zN48q8x31gHGgNyLU0nQYQ3aL3TTf5+LSjX/2OfGzNDBsuuFWkax+AA1coaYi7YClmO8oB78c6+sMI2k7w48HFqBm9d+eFFThZPfkTTRZbsGkhP967OmH2Pq+Dj3TZ9u11RQhKlh2nE8uBA4DXPxz1wtYhJ6UQSL8QIxD3T0UC3bdK/mT7vdbdEuVj7fO0rgaFl/vUdNrrWrG4OHFKE2RIPxLs8RCeGNeskZCPteFwU6X15PWdsSOAP5DgBAIkNJX8YBQx X-Bogosity: Ham, tests=bogofilter, spamicity=0.000060, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: After init_reserved_page(), we expect __init_single_page() has done its work to the page, which already initialize page->lru properly. We don't need to do it again. Signed-off-by: Wei Yang --- mm/mm_init.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/mm_init.c b/mm/mm_init.c index 14133a1cfc7b..30379b0e7729 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -759,9 +759,6 @@ void __meminit reserve_bootmem_region(phys_addr_t start, init_reserved_page(start_pfn, nid); - /* Avoid false-positive PageTail() */ - INIT_LIST_HEAD(&page->lru); - /* * no need for atomic set_bit because the struct * page is not visible yet so nobody should