Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1216982rdb; Fri, 22 Dec 2023 20:55:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFsVVHQ86n8YQHdD3vq/K9kTgLZd9bPK1EBjdsex6HcZojlQ9yaQN14fePBPMvmSi/YHWqH X-Received: by 2002:a05:6e02:15c1:b0:35f:c73b:7ff7 with SMTP id q1-20020a056e0215c100b0035fc73b7ff7mr3955458ilu.59.1703307327775; Fri, 22 Dec 2023 20:55:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703307327; cv=none; d=google.com; s=arc-20160816; b=gimiATWpUJ7JzkjG5mVaUKSIKKOdBs8IWfnfFYtYadi6pnhr+2jXJpe/XYwP/6R9v1 Vr6mUpwkUsQzqkiFKpGRX0MKnOqseVpxlzcTWySYNh0oCozXDtMniXWiIrA8Xl9NkX3V IAfUZ3JmhW/7BG6XHqBLy3PRM1QDXUTvwZQGeL61bxjsAfBy7icP4gjBnOtoMupokwOe py6WRpKGXR2eUXd1ls6npQoQT9eh/SU6kjEjZbdJK76wpVg4QO1Kzzq/2L9mqEKn6DPA D2IQEfnNnQpK35hGrp5tUupcELPqL58M6QbCJrCepIqqErfviz6+80z3MF97+NBiu6oi N9/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=5SoVEASJs5tNI3P8IvtKEX7RdqCt8eLRKS+s8poE6oE=; fh=sOEa4xhsgosIjZXvDEFQrZ7ZXcewtEG8Id1JKDME8lw=; b=NqbyasGph8oadROhKXjaF9C3QF8B/DvNrGn1eShW7zIFjaias8DrVG5TsTMCazr7/6 +22KvWqb22OpVagK6RnNxwZdRbMzRKFA06QIT272Uy3kHsxyfKt5EJKBieywZx6IEpXC 6v2AAGpNT7adCMpfuxmsL7RTdviyayevS5S5NEBy+uPn+a6cvRpkXZk0YbWsAOkqZstc ux5A3xjgkDTGUd7i9qBGewthtc9FU9kUg6rLlg8jrf+KzlKFC1KTjv9ya0CSVuXHihV6 sIVXTuUgxwaHUHThUXALxgiBzDi1+A5//ejhuam/rBVYyrHtWMia/45flRpT4frkae2B wJuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FCU8b6v4; spf=pass (google.com: domain of linux-kernel+bounces-10289-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10289-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id gm2-20020a17090b100200b0028c1dab4badsi1349366pjb.152.2023.12.22.20.55.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 20:55:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10289-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=@redhat.com header.s=mimecast20190719 header.b=FCU8b6v4; spf=pass (google.com: domain of linux-kernel+bounces-10289-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10289-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 6820A2849BA for ; Sat, 23 Dec 2023 04:55:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF06B4A3E; Sat, 23 Dec 2023 04:55:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FCU8b6v4" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 22EBB469E for ; Sat, 23 Dec 2023 04:55:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703307316; 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; bh=5SoVEASJs5tNI3P8IvtKEX7RdqCt8eLRKS+s8poE6oE=; b=FCU8b6v4Ha2d3/TYRLfnOR/9mh2PmtabY+sexLTcMpO6WsmAVmUskXpPIwctvEgxzP2aE9 P1SBUevReXtRF3yPOOsDUZun2vtt2q6i5bnY/9mBC66QafcXuD4XbS5SChXPWN6u9+50Wl TNRQPUG/5HwRdyACD6T2qouXIkK7BMs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-675-AL-UgaBqM1-_9aRctpnXJA-1; Fri, 22 Dec 2023 23:55:14 -0500 X-MC-Unique: AL-UgaBqM1-_9aRctpnXJA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 31EF5101A52A; Sat, 23 Dec 2023 04:55:14 +0000 (UTC) Received: from localhost (unknown [10.72.116.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 824B240C6EB9; Sat, 23 Dec 2023 04:55:13 +0000 (UTC) Date: Sat, 23 Dec 2023 12:55:10 +0800 From: Baoquan He To: airlied@redhat.com Cc: dri-devel@lists.freedesktop.org, dakr@redhat.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: OOM in kdump kernel caused by commit b5bad8c16b9b Message-ID: 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 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 Hi David, Recently, Redhat CKI reported a kdump kernel bootup failure caused by OOM. After bisect, it only happened after commit b5bad8c16b9b ("nouveau/gsp: move to 535.113.01"). Reverting the commit can avoid the OOM, kdump kernel can boot up successfully. From debugging, we can see that about extra 100M memory will be costed when commit b5bad8c16b9b applied on the hpe machine with 2G memory. Do you know if there's room to improve that to reduce the extra memory cost? I have opened a fedora bug to track this OOM, and copy the bug description here for reference in case someone may not access the bug easily. Bug 2253165 - kdump kernel failed to boot up because a big memory chunk is reserved https://bugzilla.redhat.com/show_bug.cgi?id=2253165 ------------------------------------------------------------ CKI reported a failure on beaker machine hp-z210-01.ml3.eng.bos.redhat.com, please see below CKI reports: https://datawarehouse.cki-project.org/kcidb/tests/10508330 In that failure, crashkernel=256M and succeeded to reserve in 1st kernel. However, in kdump kernel it failed to boot up when it started to run init process. I set crashkernel=320M to make kdump kernel boot up successfully and vmcore dumping succeeded too. After adding "rd.memdebug=4 memblock=debug" to kdump kernel cmdline, it appears to have a big chunk of reserved memory in memblock of about 122M. I don't know where it comes from. I doubt firmware stole that chunk from system memory to cause the kdump kernel having oom. [Tue Dec 5 22:32:38 2023] DMI: Hewlett-Packard HP Z210 Workstation/1587h, BIOS J51 v01.20 09/16/2011 [Tue Dec 5 22:32:38 2023] tsc: Fast TSC calibration using PIT [Tue Dec 5 22:32:38 2023] tsc: Detected 3092.940 MHz processor [Tue Dec 5 22:32:38 2023] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved [Tue Dec 5 22:32:38 2023] e820: remove [mem 0x000a0000-0x000fffff] usable [Tue Dec 5 22:32:38 2023] last_pfn = 0x61000 max_arch_pfn = 0x400000000 [Tue Dec 5 22:32:38 2023] MTRR map: 4 entries (3 fixed + 1 variable; max 23), built from 10 variable MTRRs [Tue Dec 5 22:32:38 2023] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT [Tue Dec 5 22:32:38 2023] x2apic: enabled by BIOS, switching to x2apic ops [Tue Dec 5 22:32:38 2023] found SMP MP-table at [mem 0x000f4b80-0x000f4b8f] [Tue Dec 5 22:32:38 2023] memblock_reserve: [0x00000000000f4b80-0x00000000000f4b8f] smp_scan_config+0xca/0x150 [Tue Dec 5 22:32:38 2023] memblock_reserve: [0x00000000000f4b90-0x00000000000f4e4b] smp_scan_config+0x13a/0x150 [Tue Dec 5 22:32:38 2023] memblock_reserve: [0x000000005f600000-0x000000005f610fff] setup_arch+0xd84/0xf10 [Tue Dec 5 22:32:38 2023] memblock_add: [0x0000000000001000-0x000000000008f7ff] e820__memblock_setup+0x73/0xb0 [Tue Dec 5 22:32:38 2023] memblock_add: [0x000000004d0e00b0-0x0000000060ff81cf] e820__memblock_setup+0x73/0xb0 [Tue Dec 5 22:32:38 2023] memblock_add: [0x0000000060ff81d0-0x0000000060ff81ff] e820__memblock_setup+0x73/0xb0 [Tue Dec 5 22:32:38 2023] memblock_add: [0x0000000060ff8200-0x0000000060ffffff] e820__memblock_setup+0x73/0xb0 [Tue Dec 5 22:32:38 2023] MEMBLOCK configuration: [Tue Dec 5 22:32:38 2023] memory size = 0x0000000013fae750 reserved size = 0x0000000007b7cc50 [Tue Dec 5 22:32:38 2023] memory.cnt = 0x2 [Tue Dec 5 22:32:38 2023] memory[0x0] [0x0000000000001000-0x000000000008efff], 0x000000000008e000 bytes flags: 0x0 [Tue Dec 5 22:32:38 2023] memory[0x1] [0x000000004d0e1000-0x0000000060ffffff], 0x0000000013f1f000 bytes flags: 0x0 [Tue Dec 5 22:32:38 2023] reserved.cnt = 0x5 [Tue Dec 5 22:32:38 2023] reserved[0x0] [0x0000000000000000-0x000000000000ffff], 0x0000000000010000 bytes flags: 0x0 [Tue Dec 5 22:32:38 2023] reserved[0x1] [0x000000000008f400-0x00000000000fffff], 0x0000000000070c00 bytes flags: 0x0 [Tue Dec 5 22:32:38 2023] reserved[0x2] [0x0000000057b16000-0x000000005f610fff], 0x0000000007afb000 bytes flags: 0x0 [Tue Dec 5 22:32:38 2023] reserved[0x3] [0x0000000060ff81d0-0x0000000060ff821f], 0x0000000000000050 bytes flags: 0x0 [Tue Dec 5 22:32:38 2023] reserved[0x4] [0x0000000060ffe000-0x0000000060ffefff], 0x0000000000001000 bytes flags: 0x0 ---------------------------------------------------- Thanks Baoquan