Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp106518lqb; Tue, 16 Apr 2024 10:00:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXhOkCUwHc9kQSHEZ+N7FFKkKfZfpO0zMAQygtcRyEcGIQ2r8S5CUHhJMIszIfkWvlWFUStSEGPDEaeecn5pmjN09ZuUQpclkN1RU1IaQ== X-Google-Smtp-Source: AGHT+IGIi2AwPyUw0t/Hbs06kOU2CQjiFFiGDVejftZLlDUOdFq/4nvWu2AQljssDAwMm8fVnK2h X-Received: by 2002:a05:6122:d9d:b0:4d3:37d1:5a70 with SMTP id bc29-20020a0561220d9d00b004d337d15a70mr11134464vkb.7.1713286845301; Tue, 16 Apr 2024 10:00:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713286845; cv=pass; d=google.com; s=arc-20160816; b=p8nOfOC3KAs9kKFKyuQCh4/piqVfqomqsqOo8ERW3LLv2sWLMLYgOiJCJ4M6kjh/3p fNFBw/sbVbpKmsiZifwra7GM4FM42+pJ76V9/Feey43LySMLZtoaCF/pfAF8kQ7gHYjc 9OK0TyPAKQa4laBuI2+ZfGR0kNMqg4sLiFdm52WtUHWBYjY+3of+86fyad9sRCQfL0KE 4QA5MqbIgsT2bkQt3EZ1KpQS/TL+YA146WLhrmy54ZJaOkyvm6ta5Abaj0cj94XYhD4B Y1coY22HgVULhEibNKMDtTZd0Ww0ZBcoR0LGxUZVFyZYAN89yj5pCpjuwzbpR2af+rmI PQVg== 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=KRNBS/nNdDiPqgsHkyKzXY05QuyaoZshBLw+Rc9FXMA=; fh=GqixempivjfHDaJRseE+jFhmHt2ybsL5tQN7QzIv/Lk=; b=Pitq/GI5Qvh7mIL7Q9rl6N20kXM7kvcyGTLtf14yxaoSbwDmjFuqfx/kkK2/llccpR 89nEXrOI2cEDctEkudpL7H0ou1/cU/2rOE7AQJhmHt3vZRkVS1YY7mnQ1GfqAjVMMkWA 1EoZu1TvJu3Qx1Ip3vTNO3PjTnDRZ2pPPNdc7L4W+yClvXEMMuTY54xrm5eL/JuzH03c HVqiUAL/CfHy7LK0vc/D2gKBcZCn3Q438ptnXH3cPCDmTG2s9J9LoOP+fIjT+eanONwo 0s0tk96K2q9t2FDpBEYOTZabVuMrDt0NNAQhaNasrhsJmW4iyQeT5Uz6eaSqiG5fBOPa nLkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=nt9mrA1v; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-ext4+bounces-2109-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2109-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id i14-20020ac5c2ce000000b004cba9396d69si1741932vkk.152.2024.04.16.10.00.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 10:00:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2109-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=nt9mrA1v; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-ext4+bounces-2109-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2109-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 67CB41C21F09 for ; Tue, 16 Apr 2024 17:00:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E2F0132484; Tue, 16 Apr 2024 17:00:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="nt9mrA1v" X-Original-To: linux-ext4@vger.kernel.org Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 20F6112AAE3; Tue, 16 Apr 2024 17:00:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713286834; cv=none; b=AwYV2HB1lRHn0SvCCuHpZXnl3nCZTKIkxmKHDIi6rEy3ZkTe4Ov5+N4mx2oO6ypjUcctm3t8SCmctXS3J0PSfNtIwWcE6PiU/RisEqE3MYdVjQx7TytL3Mmrn6n51HDQiyOcbCxsmAqGeplGL6aJSYzub6TtyKhnSdmXq54hhMU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713286834; c=relaxed/simple; bh=+eKfqkqGNqkcZA+3CL0j3nQn92dxN0Kh6lLW/1pOGwk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=b73xnWD2C8HNFDyQPm8n6TECcBbUTUi416YzV5zvtBmMFGTLex6IFEHi+sJqiPffF9GBi60O6R3M1JVSs1c1cZLtV54svYtnVkF3qeMTdABcb5EXZqRt4c8a9Vgu6FwIa1iGenrBDUtN0wje2Y8+fJPiLp6URnMxLEDHkjpzuak= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=nt9mrA1v; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=KRNBS/nNdDiPqgsHkyKzXY05QuyaoZshBLw+Rc9FXMA=; b=nt9mrA1vsAaOvdbNnhltvUwu9v eWZR64hdT0sHaVKkAKmAe02tetl0haDxBjBnAHLphqFzp/yy5osgH3yZyN6EMx70yH1d9DLHOvVrz dlRSWUeki4/Q/6FdINSaH5XHgpn18Dmc7bkQlSk/Sg9c13cunns8wBOiCeumO9xQ5x0BAtn5G/uU/ xnQs8dh9gnYgu2MH0woQlj+GOoe6kRJfmSNBff0Hup94JBNpjrNs0La/eiMr7DSYEkpv1GiMYVo3T yqk61h9eHqECcuvHQGIgfFsTqPQCz0ZDqgjczHx4LBks0gwP9I1Os4OQf9wpGT5Ee1lDF7iiYEL7s zChMYYyQ==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwmAX-00000000yWu-3TaB; Tue, 16 Apr 2024 17:00:29 +0000 Date: Tue, 16 Apr 2024 18:00:29 +0100 From: Matthew Wilcox To: Mike Rapoport 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 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?