Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp369426lqb; Tue, 4 Jun 2024 14:00:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBScPkls4Rv99IlfQ4GeUg5tfabviFSqhOisjHxE/NP4SIpsCjac67yGxG2ImD4rDuYoZUkBWbzo05SyoYHQq/IJboVg0BZVQf9vYVmQ== X-Google-Smtp-Source: AGHT+IGM58BmYVCyW2jeZyY536sHl+x5hf7WpDhT+bTD4P5ShbX9Q3q2+aAgYoMdqwPC2k5gbZa2 X-Received: by 2002:a50:ccd0:0:b0:574:ebf4:f786 with SMTP id 4fb4d7f45d1cf-57a8bca2e30mr504562a12.16.1717534851514; Tue, 04 Jun 2024 14:00:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717534851; cv=pass; d=google.com; s=arc-20160816; b=xG+3f+I3cytKbDeX6uD65jlWssE0ZjPGiIhU9P37V4NH2guv/mklS8WuN5SoHETmx8 DO2VwTt0viZEgeeaYoum581zae0FOMx8xjGlptCSMhgz4RE49UnyjIhuKAgoPBlg/LD+ sFm4BfXH7m256z/8oNpPrxUC3oT/6ccI8JUMPwEYBz2w4SI//IyZjjD8EKmLrEJZ1mrQ eo8ge/jXS0+jBw7ZLwSGdu59W3QRgT5ydoh0Rkhi7ZLgBFjCAWd9T042e1YjkQ14P1+7 U2cOFIv/rUEijKE2IWuWZlBAIH1pmEoTTUxFlpKtvc1HPxoQ5egGEpTUK4naGibzjyV3 xoKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=0qosb/qbd54B2qENhP6wM3+IIZ1VjJgmIxFMwOd2F0g=; fh=9MTF1NRkfiEWwiBrgouBQQDbNF/da2209RVAqx4/iXo=; b=WMPoOZIpYokWQ8bde6jtm+B49gZVxyLO0gOHGH2mOy/IQj17/JsNq/zV4ub19XZgq/ l702oA6rlXNcLnslU/eFBZH6sI+Do6zzO5gnqDJTiP/9djB9HD1pf/qL13iN6Q9K46Z8 DLxO53n+jUpvNfUIG8Bk9qkw5kjzSMukbxc26EnOxoXgVQgXlP1dQGTMGZdu7ujgU7/F v9QdEA4WYgomrvo36Tgjm5vv2LLluYbClyKY5KPyZv0JtLfsjny6MreWaluycdIa5vZe aHQmnLpnYvK9CkiD+ukZvLOyQAV+wlMzMMRbg0Cwhg9ZU4Gx99Y69QxhRadAai43pQd8 mxSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X6SZkmnf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-201374-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201374-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a6fcbdb0bsi1601704a12.35.2024.06.04.14.00.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 14:00:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201374-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X6SZkmnf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-201374-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201374-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 119BC1F265D5 for ; Tue, 4 Jun 2024 21:00:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2894B14B95F; Tue, 4 Jun 2024 21:00:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="X6SZkmnf" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D93612D215 for ; Tue, 4 Jun 2024 21:00:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717534831; cv=none; b=JwY+/9l9Yis04e9v+zrTbSZGgId6kqIxbhqrr80XFHqscVkI5kuEsUUKqzt+Txs6fxrIwJLcUxdig0adPXkys40HRLJYco/rLQ0KHUGF11kKVECbcxMa/PDkpVAAvIp2ihrUJLZFsk7PcybmNA7b+S7FLjBT4U2DDnp/muXBI+c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717534831; c=relaxed/simple; bh=y2QXvMKu+toawTwirI1umsvW2EK6ZKNHpsp7PVAKxNs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=O0NKH0jyBlssEIhQDHsHpX+h6Ch/yQZlOw/ct1RwZJSdKVkY7w3OXpW8ChVz2PBFfbxTEGSLtjwCmhXOkE7SY3LeMl/xtYXuruJiwxq/3gPDUiJHGuFf/6xogVuSfpJtAc7xUAd5c5aidfLDW+G0dh9iyiyehmb7KTrUbn8Ml2g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=X6SZkmnf; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02085C2BBFC; Tue, 4 Jun 2024 21:00:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717534831; bh=y2QXvMKu+toawTwirI1umsvW2EK6ZKNHpsp7PVAKxNs=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=X6SZkmnfZNgOG3Y3weWs3ETi/VO+/8FSLGaEoUwWuqLXTY+QWWASCFl7GDG8ZuDYY WUGo/nq/1yyD6/1E9RZwQ0gQNaw7wvYTOxdctLnUUvGc8e8UBk70GAHvtAtllUogFZ 8w8QyXtLYb6/U3wSGLRWhHL6h6bXtvRpsKtHn6uAZTsmwIBmjp3dJqYF0ntVRjq5OP Q0PXMqPXX4Bm3KwVcHMW9SIf4aL+HFzr/sMZIy0N4mn43ZTCOpKn8j3qdcbmOH25eJ QfIKgwYun7772uIhfxPV5HsYtwifcSZ6P8JqKO8hMiS6sGhhFnQkOGCJ0uDa0U8ZJJ UdLaDsEIykCJg== Message-ID: Date: Tue, 4 Jun 2024 23:00:27 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: kswapd0: page allocation failure: order:0, mode:0x820(GFP_ATOMIC), nodemask=(null),cpuset=/,mems_allowed=0 (Kernel v6.5.9, 32bit ppc) Content-Language: en-US To: Yosry Ahmed , Yu Zhao Cc: Erhard Furtner , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Johannes Weiner , Nhat Pham , Chengming Zhou , Sergey Senozhatsky , Minchan Kim References: <20240508202111.768b7a4d@yea> <20240515224524.1c8befbe@yea> <20240602200332.3e531ff1@yea> <20240604001304.5420284f@yea> <20240604134458.3ae4396a@yea> From: "Vlastimil Babka (SUSE)" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 6/4/24 8:01 PM, Yosry Ahmed wrote: > On Tue, Jun 4, 2024 at 10:54 AM Yu Zhao wrote: >> There was a lot of user memory in the DMA zone. So at a point the >> highmem zone was full and allocation fallback happened. >> >> The problem with zone fallback is that recent allocations go into >> lower zones, meaning they are further back on the LRU list. This >> applies to both user memory and zsmalloc memory -- the latter has a >> writeback LRU. On top of this, neither the zswap shrinker nor the >> zsmalloc shrinker (compaction) is zone aware. So page reclaim might >> have trouble hitting the right target zone. > > I see what you mean. In this case, yeah I think the internal > fragmentation in the zsmalloc pools may be the reason behind the > problem. > > How many CPUs does this machine have? I am wondering if 32 can be an > overkill for small machines, perhaps the number of pools should be > max(nr_cpus, 32)? > > Alternatively, the number of pools should scale with the memory size > in some way, such that we only increase fragmentation when it's > tolerable. Sounds like a good idea to me, maybe a combination of both. No point in trying to scale if there's no benefit and only downside of more memory consumption.