Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3548119yba; Mon, 29 Apr 2019 04:31:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+Ju0r7WiBFUwOeW6m4Wf8wlP27G7RCws4zfCNNMklrAG4vaUoYOXLH/3Yh2p9Z6gLiFU9 X-Received: by 2002:a17:902:9a95:: with SMTP id w21mr61834743plp.74.1556537512976; Mon, 29 Apr 2019 04:31:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556537512; cv=none; d=google.com; s=arc-20160816; b=RpHmsL77uj22Ln2/5GfVywUixLZJuqi3amrNQXGpkfmLTE4vsQGXtYgSJLRxH1tlfL NHQ6GGpqNca+JjV/zuwQ5e97Nx8zCaXE/3wd8rfmIBVNXJoUVvHkN6/W9ujCvdy+y0W3 HbisxlumbDEkePZmJJwKCogddbYCavOllj4mxSHWI9hFyAU3euAPojcS6HxAf6uOtbS6 T6escoX5/L2xsMO8d/4zWmv6aig8WwxJOmtWqj+nuzVnnljtEqFSQMJThe8d6ezQ0jsc qqFLB6KSuWXZN6LPFvuy4LgnDnQczZjLjZrKdKOKIGHRJfzLnnb3YGsKf8ZobizlquZf Oc1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=/pasL2o63KWnSx4IhrMqry5HNoe8luyELiHwEYIvWiY=; b=BJ8o9YcKm7O6UIu31N3RHnjWrc3aeWDfFOIHWt7lEyKz6kBA3IPRHtBxobYJg86Mqk fKrJP4Z39+PKG8dZ82bUuw44hzEn2yh+neGl2C6hgc3Zxuw8EQWo4t0RibbcVlC9a5Aw j7moEHZuTIjtvIiKMfc4L291TriTSAqZCKs6yo/6wvRxyj/fZ4jTXbDYlDZq4WSxjs9J GeF/VIgTU+MW9QvdSIZCZ8Ja7rFYsoHmkpdxmu4ImFQM6oGaklcCV8YsrgZc02w8qBfS bkWSERUopA4aGSsjO992lnWzpk5Zn4sMgVEks5wMsSNkFME5qvYjOTzwaogJw20o0/Oa nflA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17si30309530pgh.7.2019.04.29.04.31.37; Mon, 29 Apr 2019 04:31:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727943AbfD2La1 (ORCPT + 99 others); Mon, 29 Apr 2019 07:30:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:45870 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727829AbfD2La1 (ORCPT ); Mon, 29 Apr 2019 07:30:27 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 90B80AE84; Mon, 29 Apr 2019 11:30:25 +0000 (UTC) Date: Mon, 29 Apr 2019 07:30:22 -0400 From: Michal Hocko To: Jiri Slaby Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Johannes Weiner , Vladimir Davydov , cgroups@vger.kernel.org, Raghavendra K T Subject: Re: [PATCH] memcg: make it work on sparse non-0-node systems Message-ID: <20190429112916.GI21837@dhcp22.suse.cz> References: <359d98e6-044a-7686-8522-bdd2489e9456@suse.cz> <20190429105939.11962-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190429105939.11962-1-jslaby@suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 29-04-19 12:59:39, Jiri Slaby wrote: [...] > static inline bool list_lru_memcg_aware(struct list_lru *lru) > { > - /* > - * This needs node 0 to be always present, even > - * in the systems supporting sparse numa ids. > - */ > - return !!lru->node[0].memcg_lrus; > + return !!lru->node[first_online_node].memcg_lrus; > } > > static inline struct list_lru_one * How come this doesn't blow up later - e.g. in memcg_destroy_list_lru path which does iterate over all existing nodes thus including the node 0. -- Michal Hocko SUSE Labs