Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1245287lqj; Mon, 3 Jun 2024 15:13:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUrfU5iMmvLXGK6e0eoeSkkOg3oDoNvuqF0pixHPM76mZNgCnLxl+s9a8fSvropNKUlqJLbNZovvSGDvHF6Re033GrBuV3dZjZ14zJW5w== X-Google-Smtp-Source: AGHT+IF8T5XsQ0jqUoCk2/0jyY1QRbUNim8H2k3Ox+MzK2cZH7YwWHaR3XIP1aW45C7oyP3adXyI X-Received: by 2002:a05:6a20:12cb:b0:1b2:76d9:cd7d with SMTP id adf61e73a8af0-1b276d9cec9mr10384211637.28.1717452800569; Mon, 03 Jun 2024 15:13:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717452800; cv=pass; d=google.com; s=arc-20160816; b=y1d7/hyLaR0/2lCzgJJxnPqdK289EZsK186aoA1/osE9LKrd7AxqDCWHZHXf9kNSAq V4SFdvYOz5C2iAmHGKj5reeyLXgWK8PnjFmz7d1Fp5eZSkbx25bILF/KhuoJ1MzFJanG fA1O3m4Z+tB2OZ0+9Or5OQ3vV8RU9CZpqsCL1O4a4hVU5dTAO4F37Chzjvvr95b1crm0 LmvlCyCjUV5ILmAgvbhbJHEt2pSroom77CDi2RQvQZ3s2yMt8olSaF3mCYnrRskJQDuR qPADcjLSDCG3UfZ0GYHGAJVhmmN/NLQaf2bvuZwRyEG+P8n8TzIMejR9R6T9RXUypL/L ycBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=A4mvgXvzsnDLCwao81wHmfd72l0a/3E0/ihIluzp53E=; fh=bsOqA3ZqDdzQ9bTeYOb2T/7+3UUE/u8I5F9yCzxJSVs=; b=WBj9HUzcwt3hWGY5YINNUwxtdi6QuWokYnGt8sVwGQBlB6BNbJE0yqylbriryoIWTC frVfWjcI8hithG4/JNGLwUgA/1/ZNKXkKi+MSL/5HWvNBVPOXDupLuRPTscicb3PDKVi JxAjoFj9Tz7I8krNM6ggiSYEM9hgaButUjw7YMVp1EUXBK4xfz36zyed7kTLme6CJdxZ B3lR7xmGgwWA0Duw3ubnSKvWyaa/+FR1nwasjlQa/rpAOlecr0xHzP4NR+6mu48QJZzR h1Cx11LCiqDoOhyaODEgKn4DR+uaSxCXfumA1yw/kZykn/8Nbif3QcN60eTAQopJY2WB fPkw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=jMkzvXns; arc=pass (i=1 spf=pass spfdomain=mailbox.org dkim=pass dkdomain=mailbox.org dmarc=pass fromdomain=mailbox.org); spf=pass (google.com: domain of linux-kernel+bounces-199757-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199757-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=mailbox.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-70242c275c3si7260730b3a.229.2024.06.03.15.13.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 15:13:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199757-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=@mailbox.org header.s=mail20150812 header.b=jMkzvXns; arc=pass (i=1 spf=pass spfdomain=mailbox.org dkim=pass dkdomain=mailbox.org dmarc=pass fromdomain=mailbox.org); spf=pass (google.com: domain of linux-kernel+bounces-199757-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199757-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=mailbox.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 89AB728BD8D for ; Mon, 3 Jun 2024 22:13:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B76A513C8F2; Mon, 3 Jun 2024 22:13:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="jMkzvXns" Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) (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 D928813B791 for ; Mon, 3 Jun 2024 22:13:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717452794; cv=none; b=VwwzDxPOeP6jigAl1wJOExQZvkj37IXPqQEsghX0w1PqjF5u9HYJaaAGmKjsqidN0ojuGh0bsRpJ6I38ItFweThZ8d6eIQANid3tiYxlETPOI0ml0wGUC/V/caOR0MYCARQV9pNWGETekQV05Dm8C9y6+EHeXVQaEHuVG4mF2uY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717452794; c=relaxed/simple; bh=xRsjKQYsifiNLv6KQgQ7A7HMfCEy3MrabpNSJpv9ZEE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Z5aid7bnEJqnF5Q1Qa2Sxv62Rn6+J317fTDAainbAaJxqpp6WveHtK1KatqrwgwJYUlZMsgElPjvzhGsI2Wq4aM75+/gs4MJFbUlLo4u3bUHeuGwYr0K9YRjFODNQR4sfya0zb445tNx06JpViKlpooh+sSgbQo7sXzjlkqauvE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=jMkzvXns; arc=none smtp.client-ip=80.241.56.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (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 mout-p-201.mailbox.org (Postfix) with ESMTPS id 4VtSfC58Zlz9sZG; Tue, 4 Jun 2024 00:13:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1717452787; h=from:from:reply-to:subject:subject: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=A4mvgXvzsnDLCwao81wHmfd72l0a/3E0/ihIluzp53E=; b=jMkzvXnsDbJMZoaVvMV9HUytnV1y8iZ5KUo9y1GdlxePPX3XfQBk/s6pqxLBiUcOLlfkVk 4ayMfjjbjpLwwPRDTtLkMZ5InIqxthuD8ZRRSJim7C9L/McHiAtiPQYFKFgLEHGnmKr0jg lC2U+4tuwDf2dvtnn9jtqQ3sO8A+XweQPmmOJmBAphNUhej6GQiaB4ZsNl7D/rvOH+Q4bS Tn5EGAmlejUafEI1k+QohoXu2A/Qsz5asXCr/dzhX1DHEkx6xcjLedRWCTcJ+xtZHcIDjX ndxSvjfgjMTvemQUY67wki8rSZf9iWh39Q0vuis64IX65xKphxiJwA3SQFM/1w== Date: Tue, 4 Jun 2024 00:13:04 +0200 From: Erhard Furtner To: Yu Zhao Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Yosry Ahmed Subject: Re: kswapd0: page allocation failure: order:0, mode:0x820(GFP_ATOMIC), nodemask=(null),cpuset=/,mems_allowed=0 (Kernel v6.5.9, 32bit ppc) Message-ID: <20240604001304.5420284f@yea> In-Reply-To: <20240602200332.3e531ff1@yea> References: <20240508202111.768b7a4d@yea> <20240515224524.1c8befbe@yea> <20240602200332.3e531ff1@yea> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/L6u2AePrH2ig2h2isRGtuja" X-MBO-RS-ID: 1fbfa6395497c39efc6 X-MBO-RS-META: 46pgksj1cfgiiro3owzb3sxib5g9z6g6 --MP_/L6u2AePrH2ig2h2isRGtuja Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sun, 2 Jun 2024 20:03:32 +0200 Erhard Furtner wrote: > On Sat, 1 Jun 2024 00:01:48 -0600 > Yu Zhao wrote: > > > The OOM kills on both kernel versions seem to be reasonable to me. > > > > 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: > > > > [ 0.000000] Zone ranges: > > [ 0.000000] DMA [mem 0x0000000000000000-0x000000002fffffff] > > [ 0.000000] Normal empty > > [ 0.000000] HighMem [mem 0x0000000030000000-0x000000007fffffff] > > > > The kernel can't allocate from the highmem zone -- only userspace and > > zsmalloc can. OOM kills were due to the low memory conditions in the > > DMA zone where the kernel itself failed to allocate from. > > > > Do you know a kernel version that doesn't have OOM kills while running > > the same workload? If so, could you send that .config to me? If not, > > could you try disabling CONFIG_HIGHMEM? (It might not help but I'm out > > of ideas at the moment.) Ok, the bisect I did actually revealed something meaningful: # git bisect good b8cf32dc6e8c75b712cbf638e0fd210101c22f17 is the first bad commit commit b8cf32dc6e8c75b712cbf638e0fd210101c22f17 Author: Yosry Ahmed Date: Tue Jun 20 19:46:44 2023 +0000 mm: zswap: multiple zpools support Support using multiple zpools of the same type in zswap, for concurrency purposes. A fixed number of 32 zpools is suggested by this commit, which was determined empirically. It can be later changed or made into a config option if needed. On a setup with zswap and zsmalloc, comparing a single zpool to 32 zpools shows improvements in the zsmalloc lock contention, especially on the swap out path. The following shows the perf analysis of the swapout path when 10 workloads are simultaneously reclaiming and refaulting tmpfs pages. There are some improvements on the swap in path as well, but less significant. 1 zpool: |--28.99%--zswap_frontswap_store | | |--8.98%--zpool_map_handle | | | --8.98%--zs_zpool_map | | | --8.95%--zs_map_object | | | --8.38%--_raw_spin_lock | | | --7.39%--queued_spin_lock_slowpath | |--8.82%--zpool_malloc | | | --8.82%--zs_zpool_malloc | | | --8.80%--zs_malloc | | | |--7.21%--_raw_spin_lock | | | | | --6.81%--queued_spin_lock_slowpath 32 zpools: |--16.73%--zswap_frontswap_store | | |--1.81%--zpool_malloc | | | --1.81%--zs_zpool_malloc | | | --1.79%--zs_malloc | | | --0.73%--obj_malloc | |--1.06%--zswap_update_total_size | |--0.59%--zpool_map_handle | | | --0.59%--zs_zpool_map | | | --0.57%--zs_map_object | | | --0.51%--_raw_spin_lock Link: https://lkml.kernel.org/r/20230620194644.3142384-1-yosryahmed@google.com Signed-off-by: Yosry Ahmed Suggested-by: Yu Zhao Acked-by: Chris Li (Google) Reviewed-by: Nhat Pham Tested-by: Nhat Pham Cc: Dan Streetman Cc: Domenico Cerasuolo Cc: Johannes Weiner Cc: Konrad Rzeszutek Wilk Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton mm/zswap.c | 81 +++++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 27 deletions(-) 'bad' bisects were where the "kswapd0: page allocation failure:" showed up when running the workload, 'good' bisects were the cases where I only got the kernels OOM reaper killing the workload. In the good cases the machine stayed usable via VNC, in the bad cases with the issue showing up the machine crashed and rebooted >80% of the time shortly after showing the issue in dmesg (via netconsole). I triple checked the good cases to be sure only the OOM reaper showed up and not the kswapd0: page allocation failure. Bisect.log attached. Regards, Erhard --MP_/L6u2AePrH2ig2h2isRGtuja Content-Type: text/x-log Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bisect.log git bisect start # Status: warte auf guten und schlechten Commit # good: [88690811da69826fdb59d908a6e5e9d0c63b581a] Linux 6.1.92 git bisect good 88690811da69826fdb59d908a6e5e9d0c63b581a # Status: warte auf schlechten Commit, 1 guter Commit bekannt # bad: [a38297e3fb012ddfa7ce0321a7e5a8daeb1872b6] Linux 6.9 git bisect bad a38297e3fb012ddfa7ce0321a7e5a8daeb1872b6 # good: [830b3c68c1fb1e9176028d02ef86f3cf76aa2476] Linux 6.1 git bisect good 830b3c68c1fb1e9176028d02ef86f3cf76aa2476 # good: [1b580c9bb63414903cfb414571e92e4fd36d6969] Merge branch 'samples-bpf-remove-unmaintained-xdp-sample-utilities' git bisect good 1b580c9bb63414903cfb414571e92e4fd36d6969 # bad: [5ab500d6f9f50d8246865a2ead85d0e88ea30004] Merge branch 'sfc-implement-ndo_hwtstamp_-get-set' git bisect bad 5ab500d6f9f50d8246865a2ead85d0e88ea30004 # bad: [cc33a80b816406f900a53c7f98a50f6eacdd2e31] MAINTAINERS: Maintainer change for ptp_vmw driver git bisect bad cc33a80b816406f900a53c7f98a50f6eacdd2e31 # bad: [4debf77169ee459c46ec70e13dc503bc25efd7d2] Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd git bisect bad 4debf77169ee459c46ec70e13dc503bc25efd7d2 # bad: [1086eeac9c333b6db6c98594f02996c8261c60c5] Merge tag 'lsm-pr-20230829' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm git bisect bad 1086eeac9c333b6db6c98594f02996c8261c60c5 # good: [0fc81f376468ce67d70ecd1016dfe901a51a39f5] Merge tag 'regmap-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap git bisect good 0fc81f376468ce67d70ecd1016dfe901a51a39f5 # good: [bd6c11bc43c496cddfc6cf603b5d45365606dbd5] Merge tag 'net-next-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next git bisect good bd6c11bc43c496cddfc6cf603b5d45365606dbd5 # bad: [5553b15a4bbba8039e1f31b63642048286f540dc] m68k: implement the new page table range API git bisect bad 5553b15a4bbba8039e1f31b63642048286f540dc # good: [0c2e394ab23017303f676e6206a54c54bb0e3681] mm: move FAULT_FLAG_VMA_LOCK check down in handle_pte_fault() git bisect good 0c2e394ab23017303f676e6206a54c54bb0e3681 # bad: [3f32c49ed6f15c8412a8abc93a92c4b37e6c4592] mm: memtest: convert to memtest_report_meminfo() git bisect bad 3f32c49ed6f15c8412a8abc93a92c4b37e6c4592 # bad: [6ad243b83b5094026fdb3171711ddb25246b3d8a] mm/damon/sysfs: implement a command for updating only schemes tried total bytes git bisect bad 6ad243b83b5094026fdb3171711ddb25246b3d8a # bad: [68af05143fd4b49d4b12eab8d63c91ffbc7c4e5e] kernel/iomem.c: remove __weak ioremap_cache helper git bisect bad 68af05143fd4b49d4b12eab8d63c91ffbc7c4e5e # good: [27af67f35631ac4b61b5e4455b44c9aee8d2cc4b] powerpc/book3s64/mm: enable transparent pud hugepage git bisect good 27af67f35631ac4b61b5e4455b44c9aee8d2cc4b # bad: [34f4c198bfbe86612c368eb122002787acecaa93] zswap: make zswap_store() take a folio git bisect bad 34f4c198bfbe86612c368eb122002787acecaa93 # good: [601f006fddc66e369fdac7c572f981eafd159dac] powerpc/book3s64/radix: remove mmu_vmemmap_psize git bisect good 601f006fddc66e369fdac7c572f981eafd159dac # bad: [b8cf32dc6e8c75b712cbf638e0fd210101c22f17] mm: zswap: multiple zpools support git bisect bad b8cf32dc6e8c75b712cbf638e0fd210101c22f17 # good: [6be3601517d90b728095d70c14f3a04b9adcb166] powerpc/book3s64/radix: add debug message to give more details of vmemmap allocation git bisect good 6be3601517d90b728095d70c14f3a04b9adcb166 # first bad commit: [b8cf32dc6e8c75b712cbf638e0fd210101c22f17] mm: zswap: multiple zpools support --MP_/L6u2AePrH2ig2h2isRGtuja--