Received: by 2002:a05:7412:8d23:b0:f7:29d7:fb05 with SMTP id bj35csp10063rdb; Fri, 15 Dec 2023 20:30:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IGIFLAXIegUNMQslbgYyxAsMXcyPHYMfNOgSReqYq1S2/NcMFxU5HXbFGUo9tr6pLM+wdxs X-Received: by 2002:a50:9b1d:0:b0:551:7f8c:fb63 with SMTP id o29-20020a509b1d000000b005517f8cfb63mr3654056edi.5.1702701030020; Fri, 15 Dec 2023 20:30:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702701030; cv=none; d=google.com; s=arc-20160816; b=RIKqQRU5HnXkSVdm57T+oOy+/EqvkIPbruDc7d7Fa+mZRtRxL1GUTlO2A+uNwpeA/3 L44ru7xu2/Y6OigL9NYQEw427wXnTlzFxF5IMdnsEH+BxFTvIpGyOO4273+J3BJgoNtb LCjBng8ZVPRhkQp77+IM+ot6CjgXSW0qFo3OsGAm05i8K2j1F5JOeYyx+4UG8A7zEoah ohFKYmDNYG2oy73H0Up23Ha3h2W5dMQP61NIJaJvrn5SdBqQ82CY6P62lgvjf3kR7tBi d0+WGCVfZUqFXlQjiwsgPLwUdKq3K9qI3ZsTP7tvicloc9ml0YeSYWta/c0ABMxEiUSL pI7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=Nqs80uswKvFXsniQZu+fRa/vVcO0KsSppyNfdiCLa1w=; fh=sZiEiD2fSHk+vUFwkUJd9PbdBDETSDhzPH1FyEFE5Xg=; b=o3QkDpYPBhcFKQGu4/Y4QK7FwGb/Gb/WnQMwuahtjLMBd1pZ6Z1L337Y397RmUS5w4 kN95KFC8bkRE892NyQxEPOMKxVOBc7i4qUMR9NH/h8uPhaarwNRDTq8niOZ9kIb3ISlm TSJDjvj9pugmdGQg6WvN6ZbrVfuDVGHd0sWKdttMIrXvipLHfiZPgBw+zjFXg9AeBL2C EPS6K6PISuCXqJRWc7MDe/ZOeT5xCnse6sP36zVQdePWEgajASfPfGy/QY20m6rpgvbW H7I36d3hbxc5/lf25w1Xba91AuGtlrV19GzhkpnO0xL4dgMsAYrS5LKlnFURlOGwUABJ sM3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-2066-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2066-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id p13-20020a50cd8d000000b0054c6d39bc73si7845444edi.259.2023.12.15.20.30.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 20:30:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2066-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-2066-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2066-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 am.mirrors.kernel.org (Postfix) with ESMTPS id C2FBC1F25E68 for ; Sat, 16 Dec 2023 04:30:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0DE9311C97; Sat, 16 Dec 2023 04:30:03 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 B028B13FF3; Sat, 16 Dec 2023 04:30:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 9597E68B05; Sat, 16 Dec 2023 05:29:57 +0100 (CET) Date: Sat, 16 Dec 2023 05:29:57 +0100 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" Cc: Andrew Morton , Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Subject: Re: [PATCH 04/14] fs: Reduce stack usage in do_mpage_readpage Message-ID: <20231216042957.GD9284@lst.de> References: <20231215200245.748418-1-willy@infradead.org> <20231215200245.748418-5-willy@infradead.org> 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 In-Reply-To: <20231215200245.748418-5-willy@infradead.org> User-Agent: Mutt/1.5.17 (2007-11-01) On Fri, Dec 15, 2023 at 08:02:35PM +0000, Matthew Wilcox (Oracle) wrote: > Some architectures support a very large PAGE_SIZE, so instead of the 8 > pointers we see with a 4kB PAGE_SIZE, we can see 128 pointers with 64kB > or so many on Hexagon that it trips compiler warnings about exceeding > stack frame size. > > All we're doing with this array is checking for block contiguity, which we > can as well do by remembering the address of the first block in the page > and checking this block is at the appropriate offset from that address. Looks good: Reviewed-by: Christoph Hellwig