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 AFA28C433EF for ; Mon, 6 Dec 2021 10:54:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B940D6B007B; Mon, 6 Dec 2021 05:54:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B43D56B007D; Mon, 6 Dec 2021 05:54:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A32886B007E; Mon, 6 Dec 2021 05:54:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0077.hostedemail.com [216.40.44.77]) by kanga.kvack.org (Postfix) with ESMTP id 9679B6B007B for ; Mon, 6 Dec 2021 05:54:34 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id CFC5888CDD for ; Mon, 6 Dec 2021 10:54:22 +0000 (UTC) X-FDA: 78887060364.14.CE4DDB3 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf25.hostedemail.com (Postfix) with ESMTP id 4A8A9B000183 for ; Mon, 6 Dec 2021 10:54:22 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 08A321FD2F; Mon, 6 Dec 2021 10:54:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1638788061; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mTQenVZXC28Q/8X+IA/oYr0s+T8NO0f7tYXy3OEAYQ8=; b=D6hRDIizYMifchoBG00olyl4bg53Kcylp+0v9wzftJtiI9LmFxP/P8557aHXn8mLVSUsGV aM6CpNVl3EQfU9hBmjDq7hKrk1JpJaxJoz7OSPReC++v1a9eudwFn1JD8EIbZHXSMsXsu5 RvjKb6T68164o2/Sg/jSzETNqL3psRE= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id B692CA3B8E; Mon, 6 Dec 2021 10:54:20 +0000 (UTC) Date: Mon, 6 Dec 2021 11:54:20 +0100 From: Michal Hocko To: David Hildenbrand Cc: Nico Pache , linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, shakeelb@google.com, ktkhai@virtuozzo.com, shy828301@gmail.com, guro@fb.com, vbabka@suse.cz, vdavydov.dev@gmail.com, raquini@redhat.com Subject: Re: [RFC PATCH 2/2] mm/vmscan.c: Prevent allocating shrinker_info on offlined nodes Message-ID: References: <20211206033338.743270-1-npache@redhat.com> <20211206033338.743270-3-npache@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: e4q3cga54udgs9ko1ec547ctgmkputqm Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=D6hRDIiz; spf=pass (imf25.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 4A8A9B000183 X-HE-Tag: 1638788062-247508 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 Mon 06-12-21 11:45:54, David Hildenbrand wrote: > > This doesn't seen complete. Slab shrinkers are used in the reclaim > > context. Previously offline nodes could be onlined later and this would > > lead to NULL ptr because there is no hook to allocate new shrinker > > infos. This would be also really impractical because this would have to > > update all existing memcgs... > > Instead of going through the trouble of updating... > > ... maybe just keep for_each_node() and check if the target node is > offline. If it's offline, just allocate from the first online node. > After all, we're not using __GFP_THISNODE, so there are no guarantees > either way ... This looks like another way to paper over a deeper underlying problem IMHO. Fundamentally we have a problem that some pgdata are not allocated and that causes a lot of headache. Not to mention that node_online is just adding to a confusion because it doesn't really tell anything about the logical state of the node. I think we really should get rid of this approach rather than play a whack-a-mole. We should really drop all notion of node_online and instead allocate pgdat for each possible node. Arch specific code should make sure that zone lists are properly initialized. -- Michal Hocko SUSE Labs