Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp160376lqb; Tue, 16 Apr 2024 11:36:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW7KjGUjornftUsdl17/Emt29uFa76bRj1kYHr9JCtKPJBQ8LDif6p30PmOrNgc6swh46cH1pooGZnoyqwI9QeUPJMOSdEwXvDFYdMCmg== X-Google-Smtp-Source: AGHT+IEjItbdR89pbPNY9805TdmREsbV8Y/Bcl0wyI9jD4CZ/q7/K6cPpJ36Q8AJe/rNJ9DF/PmA X-Received: by 2002:a05:6a21:7787:b0:1a7:9476:6cb9 with SMTP id bd7-20020a056a21778700b001a794766cb9mr13197234pzc.32.1713292569609; Tue, 16 Apr 2024 11:36:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713292569; cv=pass; d=google.com; s=arc-20160816; b=QOxsXQUNyD0VvEZGg3AGXM+Qlf3C/IHWYb6BZ8wkMH5y7uF8iV5tzhFnfpeM4sZllh M3KItgqWPriQmYoMuFzhteLe3YT+Jqwo4vEiIEeCDPK6FTCa0Qif1o8C6Gg3S2zKE+8Y Z+vDHEhix9iYGh4wC5KE24uupz754lP9xwCMnKt8HZE9EtyVkmvMeBrJvc5jjXg2ArDy 4Gm/RHDzXd0kTo/baAzIHPVUFslm8JD0rycUq9+dHwbS0lLh/8FxBVcwleBeXfW6OmAr hqhggDTsewH5Hcd8hJBplOkfbygAixBLyaV/4bEZ+Iwvxdic75YZUn4kq30C0N4qVmNp u4rg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9gWIQKHqZrAFbTetE8mdyfntgM5L1HYBXaAU3WWPzP0=; fh=LCCZlmGdnR5Hf2zqt0CZuDJW23hYv+3i+Kz9i+UjCpo=; b=Lgu6JWkjxcw7MMGUmWTAZPTP8hPG7U71KyQMj+1A7uNGPR64lk7a6poAEs/mSpKPud r+qoq8pPe+067luWsQ+jzDeFy6jTtrrKgaj5B7ifLaxTpOi4xipgwYbX8GACG4NXszbR EINUO7SLJv/LpLSVL3chiiaJeM7M6JAI5Q5ka0oCdAnmiAMdsQZCmhCOajFkFvWbViG/ up66TrnlpqdpNa/q/JOpNmngOgHATW6IoaHS8mP7cq/GHbG+iEyrLvOLBNpnITuKIo/c eXRS+DOEf01lq2Eu4AhAQXULpMZJWcc/FnBqHlTiKbQ6lsYiK74x2z7h/YganTPPKd0x pd+A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B0XOvrLO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-ext4+bounces-2119-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2119-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 12-20020a63144c000000b005f40318db6dsi4341562pgu.756.2024.04.16.11.36.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 11:36:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2119-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=@kernel.org header.s=k20201202 header.b=B0XOvrLO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-ext4+bounces-2119-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2119-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 394822836EB for ; Tue, 16 Apr 2024 18:36:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 38271136E0A; Tue, 16 Apr 2024 18:36:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="B0XOvrLO" X-Original-To: linux-ext4@vger.kernel.org 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 A8F562D60A; Tue, 16 Apr 2024 18:36:01 +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=1713292561; cv=none; b=Lu6NlSY+3fEROkGqsyGPt40mpHBkgoCqr0PrM4OwTsfsaNMhGsh2UE7edhC3maQljhQ588Le6CrH3r4ZEtHK9y26vi3TKuRTseW0iMp5rGt5NllS0kmmxINf5UhMx6I8v0BREIuT3Ri8I4hH+OyMb2eAcTTgbFWPtxRi+viIoik= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713292561; c=relaxed/simple; bh=RUydQSI9IalFqEGbK9QMhcm64ilwdfZmZE3G8mYwjzg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=g7ntnfBFNwCTT10vYndeQqSnwYJ+n4VbQp4hqvKKolS9TvvOphVlm1hKkCCk1MxuMAAdUm1qhKXR05Y9/r0p7IEDpLvmRd5EI8rt6fQp3RXfC/Oy3UW5P+T7UwHb+jS5p2d/5qfbh5rnwTRtYEYIbAOvBW5BinLYlkAFw0o/njk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=B0XOvrLO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 165C3C113CE; Tue, 16 Apr 2024 18:35:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713292561; bh=RUydQSI9IalFqEGbK9QMhcm64ilwdfZmZE3G8mYwjzg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=B0XOvrLOmIGvtvZ81QXFXzN4kYMmV6ckD/uMbpDkJL8LOZfAKxnJZFm4KYJoTWIoO M8TyNsvhgGRMql9wlIWgnTAj1yJcmch0lIXb0su80K1hgIpyMoUga4NhSei6/A4QCk lc7bJGNPIsemhUlHKhSgp7YZTyvWyEl+9p/aR5FZCziUNaaxjKV5J6CY9Vg7g0tRuw 6BE159Fcux3KiPOeKvDdx07Lvy8+3/UBMYMRoW7yUZu5yxKDaYJFE6O04Tjv6grN+z fR1mt4uB/FYFf4+9WdGti/KqrBBHoPa3Dvg2s5jspWiwhLLJ4TP0WNg46JR094OSOl K+Kx+6gKRxQUQ== Date: Tue, 16 Apr 2024 21:34:51 +0300 From: Mike Rapoport To: Matthew Wilcox Cc: Nam Cao , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , 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 , Anders Roxell , Alexandre Ghiti Subject: Re: riscv32 EXT4 splat, 6.8 regression? Message-ID: 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> 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=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Apr 16, 2024 at 06:00:29PM +0100, Matthew Wilcox wrote: > On Tue, Apr 16, 2024 at 07:31:54PM +0300, Mike Rapoport wrote: > > > @@ -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 must > > > - * be done as soon as the kernel mapping base address is determined. > > > + * macro. Make sure that last 4k bytes are not usable by memblock. > > > */ > > > > It's not only memblock, but buddy as well, so maybe > > > > /* > > * The last 4K bytes of the addressable memory can not be used > > * because of IS_ERR_VALUE macro. Make sure that last 4K bytes are > > * not usable by kernel memory allocators. > > */ > > > > > - if (!IS_ENABLED(CONFIG_64BIT)) { > > > - max_mapped_addr = __pa(~(ulong)0); > > > - if (max_mapped_addr == (phys_ram_end - 1)) > > > - memblock_set_current_limit(max_mapped_addr - 4096); > > > - } > > > + memblock_reserve(__pa(-PAGE_SIZE), PAGE_SIZE); > > > > Ack. > > Can this go to generic code instead of letting architecture maintainers > fall over it? Yes, it's just have to happen before setup_arch() where most architectures enable memblock allocations. -- Sincerely yours, Mike.