From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8603B37AA9F for ; Mon, 8 Jun 2026 13:29:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780925354; cv=none; b=etv6ROu538PSis8o0RbSSSbIt1Xj6ugLrjMYZGuxyeifFYqo4ErxmUMY3qwbyaQevxOj30R/JZAMAnH7uosvYsNl3RJJsm92L4BqfBcd0dxg+vlPkEatEMNFyud2NQ3MpejKB+sVbPnfzHAqQJsT17LpgPh1Qr2jX/UbmAoppQQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780925354; c=relaxed/simple; bh=nmN8PzhMKNJXXYdxjVLFwSj0y0NfPJfo3m4hpeqI/Kc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YxEsaZbBDFyb3S6KC0NTn8cN3+HbU4RdcbeeSkmiuN9U6Mup1TRF+fC5Um8uu0x3b1Cl6mOt1qX5sgcrzxao9dtPVAUyP5oNRs+LvR4eEZG7cF8wCTEM1rrzUTYXmHqKJMQRYiu8G/iap2BYWxL8L8rdqsyiEt9z8oDjJ7KAi6U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=axjHM9oG; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="axjHM9oG" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-490bb83a3f6so35675845e9.0 for ; Mon, 08 Jun 2026 06:29:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1780925348; x=1781530148; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=RIOQhdcIWAF1YfBlwwhBIJIz3OtmjYbgnjZxpRy9+yY=; b=axjHM9oGoWaisME4HXDXmFP3gHP/3d4tjQ8gBxUhfzkrlUPgP69CF5g+8Kl8w7Twz8 TpXg+aosocwthH4zXZ0G770W2ZdYy7oM6nKXEinLxTZ+m3jiQw9oayipJnVj5hGRGjSO uIDdeYsJjP/sXA3sXezg2iCsWhGDlBPy7MK5C0puzi3Qs6QfWIkYkq6ZrzvUxsf+t07W aYVC3CntRYDPwYUsZx+TNKu8XLwEFgZNzpufYKRGlVuVB+CZapQ44rk7BEbxiSeMJZv/ PieX1abKzJUllJy1o1zjFiDbdEsv/1oZpTtrj2Wi2W1p+nlTrSBfMnboFmgaeFgaQzOc Lunw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780925348; x=1781530148; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RIOQhdcIWAF1YfBlwwhBIJIz3OtmjYbgnjZxpRy9+yY=; b=VDmQy1/MjXccSORrdeBpkXm84DQL/yvlHqmJiwjgUezkF+9HxuXEdkIzHJ0E1vBkE+ krX4O4vGm7A3mallScnz4D9G8/eHdOkTrdMIbSQFmKvY3AeIhEyv3fxFD9UYmVRAn+Jn seNQyKs6nxLsn5MFLJr7yXg1xlfJV19wpqzAZ2lIQuRiB9Qb3FwLJbYc8JHHq+XkHMiN iGLT/mQ7oSIpTWIhSSHjk/aARfNTItsZxOKgV5gvJ0A1p1yOtZgjNgkpJUs6X136Xgts 9yv5fAr4L46cA5Q0EqfJhrkqkvKLlv4sO9/OKje1uqJFDRNIHr20VzWKzZ1oa6vIlppj UpGg== X-Forwarded-Encrypted: i=1; AFNElJ8WSldxrQsY/WgWYH77vjkrPoryiMvqmcOEo+GUK+OwLODGe09VNHhyyK9624PlQUA2Geg9/WlHR+3hQW4=@vger.kernel.org X-Gm-Message-State: AOJu0YzIAVSIIryKhmzalFn/yE9YkMQkxEjazC6QhL3uvF0/atiAB6mr Xrh2NoCWTXZPzp5y1SVA06UGprlwKkPE8bVC2nY9rr/9iYEgUdwDiCfXQ8gvsvo/o+kaOc1PVpa QDNQQNnc= X-Gm-Gg: Acq92OEfkZzktMMhNEgV6b2NinYColRtL4oLBebcMfGVxKSW277GIi7yJvSrnGeyvFv NzISgC2oEBzYFgZQeBEu3P0jLvyzeiHvP6NiY8QiDvbunqLKXmnEGHqv8+Jsx3tvs1pVC/WYPEj 1WDRJ5AuObXTwdWDNOl4a5pHclrj8iswC7ffp+mc30zA1FF5iwJfBiSQ9kXs39edMgQSYq8jtWN s1vfOsGO/pmi/KF2afxLyMtixM/B1bRbok2NR6Jvhot0VRcQ+KCcQdQK7CrH166Lt6asPr0ZfRF z0uto3FX1GwEWhS1pq0vrpCDHCFBlqaTH60qSICd4gD2l/YP2DQEvphFeWAxsTe5ua7/hiNiBpr IMdb7w1D28Kfmv7CMtlWaIN/co+YqV4Fr67mBO7W4B+a+Dj7A99ukTDqVF9TZ1vxmCX3bUVH2Sn LV1QngxrktWF0rlQC1GsCHtDwm6uumXL76NN29UCggFq/2sYQ= X-Received: by 2002:a05:600c:1c1e:b0:490:44eb:c1e0 with SMTP id 5b1f17b1804b1-490c26056a4mr274307955e9.21.1780925348589; Mon, 08 Jun 2026 06:29:08 -0700 (PDT) Received: from localhost (109-81-90-161.rct.o2.cz. [109.81.90.161]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490c2d2d11asm337684075e9.1.2026.06.08.06.29.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2026 06:29:08 -0700 (PDT) Date: Mon, 8 Jun 2026 15:29:07 +0200 From: Michal Hocko To: Ruoyu Wang Cc: Johannes Weiner , Roman Gushchin , Shakeel Butt , Muchun Song , Andrew Morton , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: memcontrol-v1: use nofail allocations for soft limit trees Message-ID: References: <20260608063644.39-1-ruoyuw560@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon 08-06-26 16:34:48, Ruoyu Wang wrote: > No, I have not observed this allocation failing in practice. > > This was found by static analysis and then checked by reading the code: > memcg1_init() dereferences rtpn unconditionally after kzalloc_node(). I > treated the soft-limit tree as mandatory memcg v1 init state and used > __GFP_NOFAIL because continuing without it would not be useful. This should have been part of the changelog because it provides an insight into how have you reached your conclusion. > I agree this is early boot init code, and I do not have a > runtime failure report or fault-injection reproduction for it. If such > allocations are considered not worth handling in this path, feel > free to drop the patch. Yes, there is simply no point in handling these failures because early allocation failure like this one would very likely lead to massive failure before userspace is brought up anyway so there is no practical way to trigger the NULL ptr. -- Michal Hocko SUSE Labs