* On 2/9/23 01:05, Benjamin Herrenschmidt wrote:
> 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 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 KByte,
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 instance
should give hints to that (although, naturally, that is not the only place where
this is used).


> 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 ?

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 fixed
way, so I advise to check it well if you really intend to change it.



Mihai

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to