Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1pPuSX-0006TL-Kd for mharc-grub-devel@gnu.org; Wed, 08 Feb 2023 19:06:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPuSV-0006TC-5q for grub-devel@gnu.org; Wed, 08 Feb 2023 19:06:39 -0500 Received: from gate.crashing.org ([63.228.1.57]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPuST-00013c-8V for grub-devel@gnu.org; Wed, 08 Feb 2023 19:06:38 -0500 Received: from [IPv6:::1] (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 31905UGX030653; Wed, 8 Feb 2023 18:05:31 -0600 Message-ID: <37de5ef449072815c134b7bbb6349d6e225eb058.camel@kernel.crashing.org> Subject: Incorrect comment in disk.h (and bigger cache) ? From: Benjamin Herrenschmidt To: grub-devel@gnu.org Cc: Daniel Kiper Date: Thu, 09 Feb 2023 11:05:30 +1100 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu1 MIME-Version: 1.0 Received-SPF: pass client-ip=63.228.1.57; envelope-from=benh@kernel.crashing.org; helo=gate.crashing.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2023 00:06:39 -0000 Hi 1 Stumbled upon this: /* The size of a disk cache in 512B units. Must be at least as big as the largest supported sector size, currently 16K. */ #define GRUB_DISK_CACHE_BITS 6 #define GRUB_DISK_CACHE_SIZE (1 << GRUB_DISK_CACHE_BITS) It's me or somebody had a bad day with math ? :-) It's 32K no ? I'm tempted to increase this to speed things up on UEFI especially, either that or maybe changing grub_fshelp_read_file() so that get_block can optionally return a count of contiguous blocks so we can issue larger requests ? What do you think ? Cheers, Ben.