Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1pPukI-0004JO-C8 for mharc-grub-devel@gnu.org; Wed, 08 Feb 2023 19:25:02 -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 1pPukG-0004In-7u for grub-devel@gnu.org; Wed, 08 Feb 2023 19:25:00 -0500 Received: from ionic.de ([2001:41d0:700:3394:1::2] helo=mail.ionic.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPukD-0006zV-Sx for grub-devel@gnu.org; Wed, 08 Feb 2023 19:24:59 -0500 Authentication-Results: root24.eu; spf=softfail (domain owner discourages use of this host) smtp.mailfrom=ionic.de (client-ip=185.102.219.38; helo=185.102.219.38.adsl.inet-telecom.org; envelope-from=ionic@ionic.de; receiver=) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ionic.de; s=default; t=1675902292; bh=p96XqqVlz5U6a5fR/fyWBDeKLRtI0Q3H9y8njb1bfgQ=; h=Date:Subject:To:References:From:In-Reply-To:From; b=sYpKalZlgfwcH6EVtnTgwkXtSq7p/eQyAT6KmbKUZzEMJoBXG8qEUiZcdbkX404K1 ro2WyeI/z3GrzcxhrVP2o5nBBb641mHi5wONSkTT4tLSEWrCABd2JJjJ3MgdZdoZe5 exa0ypKefS4BGsif+HisRdJ7xrK2gap24vptBs5s= Received: from [172.22.111.213] (185.102.219.38.adsl.inet-telecom.org [185.102.219.38]) by mail.ionic.de (Postfix) with ESMTPSA id BD5201487162 for ; Thu, 9 Feb 2023 01:24:52 +0100 (CET) Message-ID: <52405c34-46b7-40fb-6725-9270109cadac@ionic.de> Date: Thu, 9 Feb 2023 01:24:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: Incorrect comment in disk.h (and bigger cache) ? Content-Language: en-US To: grub-devel@gnu.org References: <37de5ef449072815c134b7bbb6349d6e225eb058.camel@kernel.crashing.org> From: Mihai Moldovan In-Reply-To: <37de5ef449072815c134b7bbb6349d6e225eb058.camel@kernel.crashing.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------29MKl3ap9fMJZjbJCLuqtW2B" Received-SPF: pass client-ip=2001:41d0:700:3394:1::2; envelope-from=ionic@ionic.de; helo=mail.ionic.de X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-1.146, SPF_HELO_NONE=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:25:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------29MKl3ap9fMJZjbJCLuqtW2B Content-Type: multipart/mixed; boundary="------------5b1wPB4nbNmSibLGy323YKck"; protected-headers="v1" From: Mihai Moldovan To: grub-devel@gnu.org Message-ID: <52405c34-46b7-40fb-6725-9270109cadac@ionic.de> Subject: Re: Incorrect comment in disk.h (and bigger cache) ? References: <37de5ef449072815c134b7bbb6349d6e225eb058.camel@kernel.crashing.org> In-Reply-To: <37de5ef449072815c134b7bbb6349d6e225eb058.camel@kernel.crashing.org> --------------5b1wPB4nbNmSibLGy323YKck Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable * On 2/9/23 01:05, Benjamin Herrenschmidt wrote: > Stumbled upon this: >=20 > /* The size of a disk cache in 512B units. Must be at least as big as t= he > largest supported sector size, currently 16K. */ > #define GRUB_DISK_CACHE_BITS 6 > #define GRUB_DISK_CACHE_SIZE (1 << GRUB_DISK_CACHE_BITS) >=20 > It's me or somebody had a bad day with math ? :-) It's 32K no ? I believe that you merely misinterpreted the comment, though it would be = good to clarify it. The largest currently supported sector size seems to be 16 KB= yte, not the cache size. This said, the comment might also be out of date, not= sure if the sector size is actually still limited any longer. biosdisk for ins= tance should give hints to that (although, naturally, that is not the only plac= e where this is used). > I'm tempted to increase this to speed things up on UEFI especially, eit= her > 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 ? Is that really necessary? Note that this is also used for legacy MBR/BIOS= systems and I faintly remember places using that, which may do so in a fi= xed way, so I advise to check it well if you really intend to change it. Mihai --------------5b1wPB4nbNmSibLGy323YKck-- --------------29MKl3ap9fMJZjbJCLuqtW2B Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEbhHQj3UzgcdE8cg8H9Yu2W4lOocFAmPkPVQFAwAAAAAACgkQH9Yu2W4lOofT ng//WWXLKaIQZUti+5WNxla5YAUp24JNvo799tw6kbDGIcqAIeH7lDrVFovVAtdGO9nvhsvwZtcf VOQdPX+mW2wzepZCBjMeukLmmUXJXycPiCtz0ndyQf54WT14GCgf/AOf2y5WrhzHLqZDC4LwY0PB w3c6P8YSMaocxrml1YiExpd64LB5mkLzLlTcmKnXrhuWBCBcdp858ZLGXJHxeIJbjfxUJCkoShWy zOrhBRKvtpBnLTCMNZ1EVkz3ENmtfO01H4X8PGSUsqCOIZRFpn0yOYTs9bciiICkXY5Ur2n4Jijx 1tRpQdsq6uZ+sp0SVwsmQE6qzvk4XLlDBV+KGiPH90LcFUzVejnC1vg5ptAUObMHEXk0eHQEAadR BUxpIXrQsmW5nHC1gbaFlk98CNusxXHr73hyf1tEH9TVskPfjSQ7rD4x4TuqfMhj291RA3L/qQrg Ne0boqJkx5oladJWTG+Oa9858NEcff/l4QDlsyiEBZrTUciqkdk8XiQGD51tDsoejH9KP2jLJPag xlvwdG0IvHHK45qI2BgzHzlGwaM/E+347BbgP5PIl17UawN9odCMT9RvZfkzWVea0JM0P4tYHvjg FNNoEe2UtJZtVBTS8CKPkb4AAJIGA2f9ilMKjO2lx95IMTUxqdHljMilnbJW8nLMCsoz17w5hS6q nRk= =l3yv -----END PGP SIGNATURE----- --------------29MKl3ap9fMJZjbJCLuqtW2B--