Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp117193lqt; Wed, 5 Jun 2024 20:12:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUZNohnaDO48h+BaOUfNyMBNt3Mbqpqu4RZ+mmMiaDEmA0XLUOURSHCYDoCiuzay3r5VjEHEC5Sl1V6nR1IiFIri8Aj6zfiEdwVVizxHA== X-Google-Smtp-Source: AGHT+IEuMLXWdvytXMSRL8EtIqzK1Akw/m4ntavpYdNY3X6DPL5DSb5MBJiUm32trEISlpxDh8uI X-Received: by 2002:a05:6a20:728f:b0:1a7:a3ee:5e4a with SMTP id adf61e73a8af0-1b2b70306a4mr4928569637.33.1717643532619; Wed, 05 Jun 2024 20:12:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717643532; cv=pass; d=google.com; s=arc-20160816; b=hJBaKNG+8CkMC7Fhh0Ix1CZxN3s7KNo9/HXcSWZYfav0LKW1EwjYENaVu5bnmz017q B/CjuRPra7JZos7PRxA/Xm65Yc1VSQ5uCPD3Nzur9yO3KsGKB0P0xCKlCeV71Agxscri Ga66YKevZxrWKFUK4AhMOVjycU1Pwef+IzUT0W2h/OvC6YRBZm6aLIc3Mz+DdTtOSPme cN/PrUDLVYoHi6sJ/AWL1aWOTp9GTfdWbbtPaierSPUMtvwhCHAOJPRiO+H3wBpHCiEe SgzGaGg31joM48L01lx7mHemX7CDTA/j2APdLvV3WkJZs+WjcuRkBQVc1ZLe4LHX7Gk4 91hQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=uhEiQiptyrYsxItCJnv0z0F+tLwNLlQZxlw5seCMjNY=; fh=gFZRLCDUfR7QH+tW0i6ued1Q1Xe8rDPijfVIHE2u+uI=; b=lxZFupXPqyd9hcjc6MXVIZtISXgYeDgfow8waEaKeKX1k7MqK48TkXZeIomCXtco1t uk6Nt5tH43LR65BDcKVzbA1WnFq+MxfrLL4qXiHKus18BCgKxc1G0Kf6dvL2NX5IxUbq dGHMDWvXywqR1cISBQfj0x2d6WYCCCYUazJrAaSXzGJmVsQef8Lx7x9ZrHBWbZuXAqvd piVQDo3UGxaHxH8gDE18ejn/mmJRncJI8c/H5wijIQf4n6o6F7g/r0CK702FFlu4Ohiv UaEUKDpgw9sU0Ent2cY9KcgZRR7L7AQ1F8w5uosoLMn9//S1+1aS1eujlgfj0bjnkxTr ct6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=FZjQrAcb; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au dkim=pass dkdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-203565-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203565-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c280633778si2229388a91.6.2024.06.05.20.12.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 20:12:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203565-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=FZjQrAcb; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au dkim=pass dkdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-203565-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203565-linux.lists.archive=gmail.com@vger.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2F9C12865A9 for ; Thu, 6 Jun 2024 03:12:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8BE171DFEB; Thu, 6 Jun 2024 03:12:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="FZjQrAcb" Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (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 BDA692629C for ; Thu, 6 Jun 2024 03:12:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=150.107.74.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717643525; cv=none; b=Jc+j+i6g0WX+mGmCer4UP5cmPMVWZ/oQgYbOjAbdFTW7lvXUF0Fu4aQHGCJSqIvsXWH9I0HCebR+gk4LaE3b/4x08OxsKTMAtVCuyYO5Bpp2x795o9oaZOGej0pd/wlg05cwFzQSILyOdWb1vvHnf4W0iMQdQ9eru7c2qRXRTh4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717643525; c=relaxed/simple; bh=PQDvAOJ/NePyr5xbzBU4sHe719ff3jT8xXEWgA2oi+s=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=pdzflPwtQdhvNgHcV5TjWLC9jORm+DSCuufJuomT/6evHoT8aosZroC3Lqsv6k7fURgYOREEEMnSCq4t/rrmyjwzhX5s/bjSKtXLaR1xLHR3LVOypBK74xe9d3yoa0K7VdSaiPfz3EbXiKm2Xo3F7kUfeDKHqSeIfr6i+KQHvoY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au; spf=pass smtp.mailfrom=ellerman.id.au; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b=FZjQrAcb; arc=none smtp.client-ip=150.107.74.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ellerman.id.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1717643521; bh=uhEiQiptyrYsxItCJnv0z0F+tLwNLlQZxlw5seCMjNY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=FZjQrAcbKwFxwA8ICfiJcWVszxOw6HBkn6aKkD9VbGYIo9uxin3cwzFK0dbzidONL Ja4DUXaYMayOTjS7pFRVx0qeVZSr9tfWDsWOJ/UtYcKR62Lh/rkmii8fvhROtQ+zSm BM0wJF3WXMmRGCZlUvx1jKFhw7FRAgNrxCyvMQegfsIJKyXo4kQ5Ey4nvQl6NS3ZyA ceQW9rYkMNPDfaRCyVKQJiEFCnIpD/Mn6CqXsaQktk9SyRbvKhwjcfay2lFYKONvvN rWio03m88Ghz30n7sPjlNuvW9sB8Zfj+nTWmnyDlxl9l/6/VwnTB6PQFs6xvaEu/8T mPWFstwZ5H3PQ== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4VvqB84pDKz4wc4; Thu, 6 Jun 2024 13:12:00 +1000 (AEST) From: Michael Ellerman To: David Hildenbrand , Yu Zhao , Erhard Furtner Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: kswapd0: page allocation failure: order:0, mode:0x820(GFP_ATOMIC), nodemask=(null),cpuset=/,mems_allowed=0 (Kernel v6.5.9, 32bit ppc) In-Reply-To: <45fc081c-ee8d-4774-a597-708d2924f812@redhat.com> References: <20240508202111.768b7a4d@yea> <20240515224524.1c8befbe@yea> <45fc081c-ee8d-4774-a597-708d2924f812@redhat.com> Date: Thu, 06 Jun 2024 13:11:59 +1000 Message-ID: <87tti6pxxc.fsf@mail.lhotse> 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=utf-8 Content-Transfer-Encoding: quoted-printable David Hildenbrand writes: > On 01.06.24 08:01, Yu Zhao wrote: >> On Wed, May 15, 2024 at 4:06=E2=80=AFPM Yu Zhao wrot= e: ... >>=20 >> Your system has 2GB memory and it uses zswap with zsmalloc (which is >> good since it can allocate from the highmem zone) and zstd/lzo (which >> doesn't matter much). Somehow -- I couldn't figure out why -- it >> splits the 2GB into a 0.25GB DMA zone and a 1.75GB highmem zone: >>=20 >> [ 0.000000] Zone ranges: >> [ 0.000000] DMA [mem 0x0000000000000000-0x000000002fffffff] >> [ 0.000000] Normal empty >> [ 0.000000] HighMem [mem 0x0000000030000000-0x000000007fffffff] > > That's really odd. But we are messing with "PowerMac3,6", so I don't=20 > really know what's right or wrong ... The DMA zone exists because 9739ab7eda45 ("powerpc: enable a 30-bit ZONE_DMA for 32-bit pmac") selects it. It's 768MB (not 0.25GB) because it's clamped at max_low_pfn: #ifdef CONFIG_ZONE_DMA max_zone_pfns[ZONE_DMA] =3D min(max_low_pfn, 1UL << (zone_dma_bits - PAGE_SHIFT)); #endif Which comes eventually from CONFIG_LOWMEM_SIZE, which defaults to 768MB. I think it's 768MB because the user:kernel split is 3G:1G, and then the kernel needs some of that 1G virtual space for vmalloc/ioremap/highmem, so it splits it 768M:256M. Then ZONE_NORMAL is empty because it is also limited to max_low_pfn: max_zone_pfns[ZONE_NORMAL] =3D max_low_pfn; The rest of RAM is highmem. So I think that's all behaving as expected, but I don't know 32-bit / highmem stuff that well so I could be wrong. cheers