From mboxrd@z Thu Jan 1 00:00:00 1970 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 E771EC433F5 for ; Sun, 6 Feb 2022 02:11:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B65A36B00A2; Sat, 5 Feb 2022 21:11:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B15BE6B00A3; Sat, 5 Feb 2022 21:11:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A04826B00A4; Sat, 5 Feb 2022 21:11:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0035.hostedemail.com [216.40.44.35]) by kanga.kvack.org (Postfix) with ESMTP id 8D4AA6B00A2 for ; Sat, 5 Feb 2022 21:11:25 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 0B61318256742 for ; Sun, 6 Feb 2022 02:11:25 +0000 (UTC) X-FDA: 79110728130.05.14E8406 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) by imf15.hostedemail.com (Postfix) with ESMTP id A3B64A0006 for ; Sun, 6 Feb 2022 02:11:24 +0000 (UTC) Received: by mail-ej1-f54.google.com with SMTP id p15so31392061ejc.7 for ; Sat, 05 Feb 2022 18:11:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kom0rnZXZn47YFlPMfS28zjK6FLYKt/ZTTdoLV2yT4Q=; b=Tp67YNDYO4k7ScZNzTnDsX9iV0SicTghOQd6D5OO4tZ0aI0A1+ky8payE32xq/VnCe HFQd+9wiJ00MEOVBe9k54EHI/diQp9Tjq+V11YW8XI15zYv0xe7viWUfJlGtkNMMoVjj OnCn7XCHrV4t5K1nadLISMRBUXyHirD8loWAjjcoLSe5izAlbtQRbO7pamPqb9BQxF9o C3vLuRAlfAK71yJQXC1F19fFiuIYorig69CyNrATmF2vFXIsQYgo52WY4gkLEY6xowQ8 SKirnPMYoa34eVjaNiZug804bQSyNbJJsARgeQ7BCR6kk9pXjF0luaukaqp51zBwB5uw ziVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=kom0rnZXZn47YFlPMfS28zjK6FLYKt/ZTTdoLV2yT4Q=; b=4FPOjHGhIQyAlfCxAgaEsBViTr/5+Gq5pnBjtJ8DDG7sfAjFNm8doW3kprxfWgpjKx hc+qTDhnAeivuCOR17GZLOQYR1eHIFA8Q2NAZTayliWhhogNpH3aPkPklBNLCxL/j6/A q8McaK8B8AOL8YkTSYkS56unFsfuTXR5gjwEP5ybCDx5ES6DXOiC3jp4SWmbGaj+EVLD P9yjq6YTk9BgUw8/aOD5nsIf9modzwahKcULL55Xroc2ivJoLr02TY8zU1qKtRF8Qajm gCv4cZYGEYyNArqY1dQ0vxEUCKgrSpqUDkzfQvyQg7ax5B5jjwL9m4yCaaKj+FRph6kV BmYw== X-Gm-Message-State: AOAM533VVFF+K2uCdcX5lGJEZ28bIxOaIqaUNHXbR/XyZiP3aEdrJx8/ GMpdxc40adaKWHckB3xOf3A= X-Google-Smtp-Source: ABdhPJzU4BjbD9JCm7i0prrIm4SV2jedxnxnvSs6CAyPDmVTsNKNyqF7xstxj9l6UCiAf8sMoYRdfA== X-Received: by 2002:a17:907:3f87:: with SMTP id hr7mr5173101ejc.586.1644113483316; Sat, 05 Feb 2022 18:11:23 -0800 (PST) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id p13sm2128231ejx.191.2022.02.05.18.11.22 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Feb 2022 18:11:22 -0800 (PST) Date: Sun, 6 Feb 2022 02:11:22 +0000 From: Wei Yang To: David Hildenbrand Cc: Wei Yang , akpm@linux-foundation.org, mhocko@suse.com, mgorman@techsingularity.net, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/page_alloc: add zone to zonelist if populated Message-ID: <20220206021122.luaihnjz3vhqwxax@master> Reply-To: Wei Yang References: <20220203020022.3044-1-richard.weiyang@gmail.com> <530d1ca4-6e05-b237-e0a9-c43d61767c4d@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <530d1ca4-6e05-b237-e0a9-c43d61767c4d@redhat.com> User-Agent: NeoMutt/20170113 (1.7.2) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Tp67YNDY; spf=pass (imf15.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.54 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspam-User: nil X-Rspamd-Queue-Id: A3B64A0006 X-Stat-Signature: xfu45gsxignrhm3s77c6xyqoynoxrzpz X-Rspamd-Server: rspam12 X-HE-Tag: 1644113484-270739 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: On Thu, Feb 03, 2022 at 10:25:51AM +0100, David Hildenbrand wrote: >On 03.02.22 03:00, Wei Yang wrote: >> During memory hotplug, when online/offline a zone, we need to rebuild >> the zonelist for all nodes. Current behavior would lose a valid zone in >> zonelist since only pick up managed_zone. >> >> There are two cases for a zone with memory but still !managed. >> >> * all pages were allocated via memblock >> * all pages were taken by ballooning / virtio-mem >> >> This state maybe temporary, since both of them may release some memory. >> Then it end up with a managed zone not in zonelist. >> >> This is introduced in 'commit 6aa303defb74 ("mm, vmscan: only allocate >> and reclaim from zones with pages managed by the buddy allocator")'. >> This patch restore the behavior. >> >> Signed-off-by: Wei Yang >> CC: Mel Gorman >> CC: David Hildenbrand >> Fixes: 6aa303defb74 ("mm, vmscan: only allocate and reclaim from zones with pages managed by the buddy allocator") > >That commit mentions that there used to be some ppc64 cases with fadump >where it might have been a real problem. Unfortunately, that commit >doesn't really tell what the performance implications are. > It mentioned a 100% CPU usage by commit 1d82de618ddd. Currently I don't find which part introduced this and how it is fixed. >We'd have to know how many "permanent memblock" allocations we have, >that can never get freed. > For the case in that commit, the memory are reserved for crash kernel. I am afraid this never get freed. But for all the cases, I am not sure. -- Wei Yang Help you, Help me