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 16C96C433EF for ; Mon, 13 Dec 2021 19:11:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 49DD96B0073; Mon, 13 Dec 2021 14:10:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 44CEC6B0074; Mon, 13 Dec 2021 14:10:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 315466B0075; Mon, 13 Dec 2021 14:10:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id 2405E6B0073 for ; Mon, 13 Dec 2021 14:10:56 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D46D98249980 for ; Mon, 13 Dec 2021 19:10:45 +0000 (UTC) X-FDA: 78913712850.22.90BE7AC Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by imf09.hostedemail.com (Postfix) with ESMTP id 37F95140015 for ; Mon, 13 Dec 2021 19:10:41 +0000 (UTC) Received: by mail-ed1-f46.google.com with SMTP id r11so54719632edd.9 for ; Mon, 13 Dec 2021 11:10:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=r1ecokVaQ0SqYiY1LdKXr1h9sQBEtT8rIZ4tvd1OORo=; b=P9QGIql6Vz08w9S1y2wCaCKJ00KD6ArvAbhyxv18w7YoTErQ51ONNYgXtlxcTE0Yb9 NVwqPpvj6U96DcjR/IzsBGZ0DssZ4SwGICNnyFJcUy6HxSp4k3r/T88OWWpjg/d/uQzi XSLqPrueMXzBrYRuxiodAw2l77KD+fkq2wT2MPBD85zSXp9cxJ0RFnybH633nRJP058a sToFj/ReoQ8yk1LzY/fA4BGjpMhgJZM0ncAjHI9dBNFIcO1fOV+AvFNO1/C29sIuk49X 27xlmv7pfRVtycCqA8ZQfhy+ByzUfZq3lsDtdpMGvuAE5DzoF42vhkH24f5QVJ1hi/JG +c3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=r1ecokVaQ0SqYiY1LdKXr1h9sQBEtT8rIZ4tvd1OORo=; b=F9W5pXVhAmT3/89mAVBTnf2NIJsmgARfCvi0PQUFDV4ml/Zx3bfk/ug8Gve4/ZEC5W 3vsRqwuKAVNDBFF6Ra25Xj6HSeqWrKF5Xl0y9xd1FaRmUl2GhNWCZzHniS9QI59JfZ9e ogOOwVDnQugqGiS0mgG+PE8fJe0GMdtEXC0+XMNHrp2/eVrW1Paq0BU+Iv4g0bv85JG3 3JsqafYVZM79WlYlUFgS7IWHeuZbauRHkDUdN+0e1Lsi2H3jYLitFHYT0ZEpYCpYZOj9 r3TlRv7JgCyJDUmljsYg5UBhBqDV6ikxDE704dyvjQB8TbIi62x3o7Kud8Jr3irMfd/D W7KA== X-Gm-Message-State: AOAM530YTm2/1b0HWI4nF5ZHmuZ7ixm103oVWGixg7raTgYJUB6xzrSW on1Fc0DSPcc8+H0seNA46Vhuzj8iRrg6ySFvk7o= X-Google-Smtp-Source: ABdhPJzQinaM+hVBEzI9tlMOJ3e2UplBZSf3lwwJrbT54tPMEnG8T3A0zZ9qjGlss6IMO001lNWyapemMwfs3y4PhcA= X-Received: by 2002:a17:907:2d20:: with SMTP id gs32mr325813ejc.270.1639422643210; Mon, 13 Dec 2021 11:10:43 -0800 (PST) MIME-Version: 1.0 References: <20211207224013.880775-1-npache@redhat.com> <20211207224013.880775-2-npache@redhat.com> <20211207154438.c1e49a3f0b5ebc9245aac61b@linux-foundation.org> <17a7d9e4-5ebc-1160-1e5e-97707b6e5286@redhat.com> In-Reply-To: From: Yang Shi Date: Mon, 13 Dec 2021 11:10:31 -0800 Message-ID: Subject: Re: [PATCH v2 1/1] mm/vmscan.c: Prevent allocating shrinker_info on offlined nodes To: Michal Hocko Cc: Nico Pache , Andrew Morton , Linux Kernel Mailing List , Linux MM , Shakeel Butt , Kirill Tkhai , Roman Gushchin , Vlastimil Babka , Vladimir Davydov , raquini@redhat.com, David Hildenbrand Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 37F95140015 X-Stat-Signature: pgw5tmf4c4mkfsauh7u1g4yrersd9nhb Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=P9QGIql6; spf=pass (imf09.hostedemail.com: domain of shy828301@gmail.com designates 209.85.208.46 as permitted sender) smtp.mailfrom=shy828301@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1639422641-188457 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 Tue, Dec 7, 2021 at 11:59 PM Michal Hocko wrote: > > On Tue 07-12-21 17:26:32, Yang Shi wrote: > > On Tue, Dec 7, 2021 at 5:23 PM Yang Shi wrote: > > > > > > On Tue, Dec 7, 2021 at 4:33 PM Nico Pache wrote: > > > > > > > > > > > > > > > > On 12/7/21 19:26, Yang Shi wrote: > [...] > > > > > AFAICT, we have not reached agreement on how to fix it yet. I saw 3 > > > > > proposals at least: > > > > > > > > > > 1. From Michal, allocate node data for all possible nodes. > > > > > https://lore.kernel.org/all/Ya89aqij6nMwJrIZ@dhcp22.suse.cz/T/#u > > > > > > > > > > 2. What this patch does. Proposed originally from > > > > > https://lore.kernel.org/all/20211108202325.20304-1-amakhalov@vmware.com/T/#u > > > > > > > > Correct me if im wrong, but isn't that a different caller? This patch fixes the > > > > issue in expand_one_shrinker_info. > > > > > > Yes, different caller, but same approach. The cons with this approach > > > > And the same underlying problem. > > > > > is we have to fix all the places. It seems Michal and David are not > > > fans for this approach IIRC. > > Yes, agreed. We definitely do not want to spread this node_offline > oddity all over the place. There are two different way to approach this. > Either we handle node_offline nodes at the page allocator level when > setting the proper zonelist (ideally protect that by a static key for > setups which have these nodes) or we allocate pgdat for all possible > nodes. I would prefer the second because that is more robust (less > likely to blow up when somebody does > for_each_node(nid) > something(NODE_DATA(nid)) > > The discussion is ongoing at the original thread where Alexey Makhalov > reported a similar problem (the subthread is > http://lkml.kernel.org/r/Ya89aqij6nMwJrIZ@dhcp22.suse.cz) Thanks, Michal. Yeah, it seems more straightforward and more robust to me. I'm not familiar with memory hotplug, hopefully it doesn't break hotplug. > -- > Michal Hocko > SUSE Labs