Message ID | 63a3648aa6d49ad2dcf8c885d6a874e6c91624a0.1697799303.git.zhengqi.arch@bytedance.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 1240DCDB474 for <linux-mm@archiver.kernel.org>; Fri, 20 Oct 2023 11:05:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8B6376B02C3; Fri, 20 Oct 2023 07:05:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8667F6B02C4; Fri, 20 Oct 2023 07:05:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 72FF56B02C5; Fri, 20 Oct 2023 07:05:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 6521F6B02C3 for <linux-mm@kvack.org>; Fri, 20 Oct 2023 07:05:26 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 121D880810 for <linux-mm@kvack.org>; Fri, 20 Oct 2023 11:05:26 +0000 (UTC) X-FDA: 81365558652.15.2C59E56 Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) by imf20.hostedemail.com (Postfix) with ESMTP id 43B981C0005 for <linux-mm@kvack.org>; Fri, 20 Oct 2023 11:05:24 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=Jp9QUhgx; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf20.hostedemail.com: domain of zhengqi.arch@bytedance.com designates 209.85.160.44 as permitted sender) smtp.mailfrom=zhengqi.arch@bytedance.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697799924; 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=KvNzbx+wE6QPfE2MeeEi/ZV40Dr0N1fCnVWImcOfsdE=; b=UDdWBfTdmB9yku3wgNSfAG0nk/hG5Tuol8a92GCI79knegzkXCzeiuehQgl0TpjtRG5sW7 xSazHcwSdLJYWhIUDwdK/FPN9IT+hsmFnnUQkBlNSw61cEa12+QBMrWUs+AzWmBeE25jc6 cF0rsqu7ZDNyPgvkdnnz+rHhiTrJWhM= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=Jp9QUhgx; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf20.hostedemail.com: domain of zhengqi.arch@bytedance.com designates 209.85.160.44 as permitted sender) smtp.mailfrom=zhengqi.arch@bytedance.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697799924; a=rsa-sha256; cv=none; b=wqjt91bvdVhZspGiL3HmlYkkzzHHqz7sjXQv6qpdovhJWi1o7nn8oa0QyOqf0mBxJCNiF0 19KZ+id/kIZGkNNTPxq07Jxhuvr0kFnBHfbxc9xZxIImVIRATFGdeSGXkT59b0ipcW8fnT Dpj+zNKKAD3hKfLDArxaVy+u2dJ4+yw= Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-1e9c28f8193so191693fac.1 for <linux-mm@kvack.org>; Fri, 20 Oct 2023 04:05:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1697799923; x=1698404723; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KvNzbx+wE6QPfE2MeeEi/ZV40Dr0N1fCnVWImcOfsdE=; b=Jp9QUhgxldO64o4zq+6jytfA06fTF8FfpxKKzUzMANATjiAA1Rped26WFAJsVG2Tok m2slHupcTnoThR4P+bQHhCDrYODwvsg2btRbsrpkJAvGqTWGB0tAc91tkqgFQPIZjD7a IZ2kys/dnqLAnoAnA3IQfOxBz+adzIpWJepV8Y4QsBol95GzmLmtZC5PZUenaECLgR/n x/CR6MIkZaHeK5NVj1IRDXAaevIttgrPk3E8Ki6fOQJ0E8/QWbR/jxIQWh2ZmaN85oW4 3R5Temk+qs5JkXuEnpEL4XGMXmEJbs23cfU+++a0mKUFCO9dym5eFEvSh1NqLTsg3b93 eU5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697799923; x=1698404723; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KvNzbx+wE6QPfE2MeeEi/ZV40Dr0N1fCnVWImcOfsdE=; b=tLvD493Zp6WzKWC/CoIgGuHbo3psGzGuWr++duOo6gVIR2X2+KcILTdMKFvuZylcvO IStlBRHIEd1BSO2O3ygdePOIWmbRNRmL+zFkFYAijiygLarMeC89nEh0cyk020pIDndj OiQu9ysdrFQzT9dkO6JRkpAdoOcl4lP0o/NukHlG7aM/LeVjKJrkPmzTrd3LqZnWJrH9 zsXpAcujcqGl9wrPEVOLBXD2gdmt2+HHaYn611oij9iWvHxXWpjC2ukeLRtWodJxz5Zc GEZYKSXhciubdtEjnGs95O/O/9bQ0c0cZj947kMKxb2sHRIJ9dUTgmcLBgE8YdgXZD32 0A6Q== X-Gm-Message-State: AOJu0Yz6c8P9+/UCnPfqc8sKoisS48IkcnnpPvkv9xX3tqcY+kDE1ThR oOvqOyNp4hH9knmAJJaIWif8qg== X-Google-Smtp-Source: AGHT+IEZbrCU3UtQrs961bnYFojXLZPVOeYgp6UFfxmFOYWwqhfMWrAExdDU7Tw6uXfIF3bbdxeRGw== X-Received: by 2002:a05:6358:72a:b0:168:a3a4:6dc2 with SMTP id e42-20020a056358072a00b00168a3a46dc2mr1251379rwj.3.1697799923312; Fri, 20 Oct 2023 04:05:23 -0700 (PDT) Received: from C02DW0BEMD6R.bytedance.net ([203.208.167.147]) by smtp.gmail.com with ESMTPSA id z6-20020aa79f86000000b006be4bb0d2dcsm1323865pfr.149.2023.10.20.04.05.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 04:05:22 -0700 (PDT) From: Qi Zheng <zhengqi.arch@bytedance.com> To: akpm@linux-foundation.org, rppt@kernel.org, david@redhat.com, vbabka@suse.cz, mhocko@suse.com Cc: willy@infradead.org, mgorman@techsingularity.net, mingo@kernel.org, aneesh.kumar@linux.ibm.com, ying.huang@intel.com, hannes@cmpxchg.org, osalvador@suse.de, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Qi Zheng <zhengqi.arch@bytedance.com> Subject: [PATCH v4 2/2] mm: memory_hotplug: drop memoryless node from fallback lists Date: Fri, 20 Oct 2023 19:04:46 +0800 Message-Id: <63a3648aa6d49ad2dcf8c885d6a874e6c91624a0.1697799303.git.zhengqi.arch@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <cover.1697799303.git.zhengqi.arch@bytedance.com> References: <cover.1697799303.git.zhengqi.arch@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 43B981C0005 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: tsirjc6awomyy17w1o7dzpimc1z6qb87 X-HE-Tag: 1697799924-20530 X-HE-Meta: U2FsdGVkX1+xYgtkYfpb1/nHKW/K7aH7j1KtDl/CCqqQO7hyjD0g+zwFxf9BR7Jd+gqyZ7VjoH5p+d3YUzXoNoPeX3dYh/m5+FhsOJivc3D/bMJMWr78fc4RUII9zX3MyTglaD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LcEkHQwCxfnJrZcY2Mi0dIRE7aUm/uuVZgVQijAar87U40w7Fj8yriFaETRP5a/ttjFDUuzB5I5+C6W0IaFJ8mD/n38CuViDYEyEMKz7ytmhnnQBjU0UZtH69UhvKi3YjHFwtpcq8G2ic7HeLyaUWeVszKjrb17bumECPvaqsaVLUuFg/4yv2d22JmUV/q3CmGNe2p1qSIiHWFu7OZqYUYFLBjdBO0fbCuUCSHRGToIpcIs4suxyeHYBpu7fbjR1ukdbtjMUEaEZVJ6bywUSjSLl0byDY+v7f+2J5sQFTbJZJecmssNnGAJ+E2r 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: <linux-mm.kvack.org> |
Series |
handle memoryless nodes more appropriately
|
expand
|
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index d4a364fdaf8f..f019f7d6272c 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -2036,12 +2036,16 @@ int __ref offline_pages(unsigned long start_pfn, unsigned long nr_pages, /* reinitialise watermarks and update pcp limits */ init_per_zone_wmark_min(); + /* + * Make sure to mark the node as memory-less before rebuilding the zone + * list. Otherwise this node would still appear in the fallback lists. + */ + node_states_clear_node(node, &arg); if (!populated_zone(zone)) { zone_pcp_reset(zone); build_all_zonelists(NULL); } - node_states_clear_node(node, &arg); if (arg.status_change_nid >= 0) { kcompactd_stop(node); kswapd_stop(node);