Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp146355lqb; Tue, 16 Apr 2024 11:09:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVD1bpyc9t8/o8uysohw8mIpbc3edgl8VqBGjHp4ku7EqWIjzBSmQ+78smeTIx378DitFOnQUZWOWQTWjbVTec9+kArdrvb9oEqZGEMFQ== X-Google-Smtp-Source: AGHT+IF6OanbYkPfHhEyrPAea3dTZBkf5MDUOR0i/SmtTCGZhUQylEyzhv9d47JtXHZMFnZ54nfR X-Received: by 2002:a17:902:b287:b0:1de:f91:3cf3 with SMTP id u7-20020a170902b28700b001de0f913cf3mr10768723plr.55.1713290966290; Tue, 16 Apr 2024 11:09:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713290966; cv=pass; d=google.com; s=arc-20160816; b=iIYxPUaGiE73GQhiJmd3tr/RDmABMn6tiaVD69WVdl9gULRIZlijg8EIX6uVxpKIWj tHvUuA9CKd5iGHD2AsVrCLvFeAvZyabpM2yaZ1+79WBhTJRrqqRc89lWysgt947DvzxM HeTqDgJNiEjyz5nZfOOkfm8bcqj0ReDUqW2MZQNEuaEhG6Xo28s2jiR83kq6p8ha7fsC p4tLQkParYl8jyPgUYt10UjcLVH2dUGTsTU0aMNlGXY6++bfjwtvPqDt2YzTpWu0bjz/ pJ/SH3Z79vFPGbNcC8dRabSBAnoUBez9/i9gqsBrf+/yoof9pgGo3TodSboOpoGcMtrC tMDA== 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:references:in-reply-to:message-id :subject:cc:to:from:dkim-signature:dkim-signature:date; bh=SKLrAI5OCUe/r2J49t7qM8eP1fCwVfsTtu23X+cbhBw=; fh=RZFQQK3d+HS7eCqMyQ+dnNmw6s0XH5SCuU5jPf0sxc4=; b=X576NesxKtMHJJD/UQ1k5ZdKPpanZbwXkWOaOQK0ConU+PRtRlrdoO70JhDFnt1jJE ahurKyWqFG4P4aG8V4nqmlKOFFr+QACd7m2onL3NyCYgp+2LVneluAviJqpPKANCVMMn tYRV5ovvpw2fZrRM/wWIWZOK9+b8j2IZWV8P/r0WVBf7sAfJZBMFkikTZ5Pi5y9gVZQC 5TWXHKL5S1ofYWM7P44I4SJNehJ240e6bQ8Zwee9nL5xaLpjuOq/byehMjHoQuMr0A1g G63k7R1c0iL73L5RVq+KWe1JH94wOJNk88MwHBK07q5aPk858muSbfaNdXqA2NgmSo/b cA6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=GMhnFAjb; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-ext4+bounces-2117-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2117-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d3-20020a170902b70300b001e0e85b2950si9762486pls.542.2024.04.16.11.09.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 11:09:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2117-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=GMhnFAjb; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-ext4+bounces-2117-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2117-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 7EBBB284541 for ; Tue, 16 Apr 2024 18:09:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C8148134436; Tue, 16 Apr 2024 18:09:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="GMhnFAjb"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ixQmOQ/Z" X-Original-To: linux-ext4@vger.kernel.org Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 F052A132C1F; Tue, 16 Apr 2024 18:09:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713290958; cv=none; b=SqNCjE1JgzJQNA3vD4pAmyt9XcPtjkhjnMjoHeNkdDjFc38rzwMJRxKoKnNGn4ts4FhpZc6bvORWl/ABwTIdUgtJcNxuECZDxglBP3n2Vkije+rHjGuOkADAIwQ0O97TEI1WjSzOZ18C16ugGfY+oSQ+h3J/kTEVwiJhud4ey3s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713290958; c=relaxed/simple; bh=H8MrxffkceMumKJooGQ32Ry3ywid0CvWTua4pVRYLN4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qtMhSQ+EUtSTAjMSeTO+QN21B1lK+YV01ciDx5e2DtGEIrDkOzX7fwjUjLfue4dHTpbgjGeVPyZ6hSZKvadiLsUYaSvxdnw9nJ8WV3R2v6ogIyxfSx1uYgvEYiO6PmsZ+srMIa4SZ6iKOjI+t0iMRPA8b9tR7OwwS8H3kZ3qncg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=GMhnFAjb; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ixQmOQ/Z; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Tue, 16 Apr 2024 20:09:10 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1713290953; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SKLrAI5OCUe/r2J49t7qM8eP1fCwVfsTtu23X+cbhBw=; b=GMhnFAjb5aq0fLq1hjaVwDC+5vKgO0aCNwGaU5Cg54Dwdl9OeS42slUU0vCDSUpV6s95+f So/JFdqMFwQ0NhjaqOe7zQ6d/VA+QxIwi1ucEUpCvWu3Z99MtkGTlNIi+1NEvgulAc7YK4 mGvSc0PTS7Km/W9dDgIwMo0psk4jzZkt8Hjk2JQlw+oovvt5+rRdK1El/jdfj0lNyKmJM8 K3c5LmVS0QcaJ04UQk8GV7B8uhyW95BRdfrKnE8JKF2ILPHxVKa8r24H2DSgA65SfvSj8e eEa7YmcRxOk5ZCcqgm4uc/7pdnlChnyC0eyqwezB7TpQ98nV0HvVanFPYH5acA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1713290953; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SKLrAI5OCUe/r2J49t7qM8eP1fCwVfsTtu23X+cbhBw=; b=ixQmOQ/Z45c/M1fP70O0/XH6yLZ1zVX1OS5AAh3Zp3iBkAq1q4nMCxItjJ18ha6HRKoS0G uM/NfWOUolPOHiBA== From: Nam Cao To: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Cc: Mike Rapoport , Christian Brauner , Andreas Dilger , Al Viro , linux-fsdevel , Jan Kara , Linux Kernel Mailing List , linux-riscv@lists.infradead.org, Theodore Ts'o , Ext4 Developers List , Conor Dooley , "Matthew Wilcox (Oracle)" , Anders Roxell , Alexandre Ghiti Subject: Re: riscv32 EXT4 splat, 6.8 regression? Message-ID: <20240416200910.294ea07b@namcao> In-Reply-To: <875xwhuqrx.fsf@all.your.base.are.belong.to.us> References: <20240416-deppen-gasleitung-8098fcfd6bbd@brauner> <8734rlo9j7.fsf@all.your.base.are.belong.to.us> <20240416171713.7d76fe7d@namcao> <20240416173030.257f0807@namcao> <87v84h2tee.fsf@all.your.base.are.belong.to.us> <20240416181944.23af44ee@namcao> <875xwhuqrx.fsf@all.your.base.are.belong.to.us> Precedence: bulk X-Mailing-List: linux-ext4@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 On 2024-04-16 Bj=C3=B6rn T=C3=B6pel wrote: > Nam Cao writes: >=20 > > diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c > > index fa34cf55037b..f600cfee0aef 100644 > > --- a/arch/riscv/mm/init.c > > +++ b/arch/riscv/mm/init.c > > @@ -197,7 +197,6 @@ early_param("mem", early_mem); > > static void __init setup_bootmem(void) > > { > > phys_addr_t vmlinux_end =3D __pa_symbol(&_end); > > - phys_addr_t max_mapped_addr; > > phys_addr_t phys_ram_end, vmlinux_start; > > =20 > > if (IS_ENABLED(CONFIG_XIP_KERNEL)) > > @@ -238,17 +237,9 @@ static void __init setup_bootmem(void) > > /* > > * memblock allocator is not aware of the fact that last 4K bytes of > > * the addressable memory can not be mapped because of IS_ERR_VALUE > > - * macro. Make sure that last 4k bytes are not usable by memblock > > - * if end of dram is equal to maximum addressable memory. For 64-bit > > - * kernel, this problem can't happen here as the end of the virtual > > - * address space is occupied by the kernel mapping then this check mu= st > > - * be done as soon as the kernel mapping base address is determined. > > + * macro. Make sure that last 4k bytes are not usable by memblock. > > */ > > - if (!IS_ENABLED(CONFIG_64BIT)) { > > - max_mapped_addr =3D __pa(~(ulong)0); > > - if (max_mapped_addr =3D=3D (phys_ram_end - 1)) > > - memblock_set_current_limit(max_mapped_addr - 4096); > > - } > > + memblock_reserve(__pa(-PAGE_SIZE), PAGE_SIZE); > > =20 > > min_low_pfn =3D PFN_UP(phys_ram_base); > > max_low_pfn =3D max_pfn =3D PFN_DOWN(phys_ram_end); =20 >=20 > Nice! Would you mind submitting this as a proper fix (unless there's a > way to do it non-arch specific like Matthew pointed out). I don't mind, but I am waiting for the discussion on the non-arch solution. Best regards, Nam