Skip to contentSkip to conversation

disk: use maximum number of sectors for LBA

PATCH In review ValdikSS via Grub-devel 3 participants 10 messages Oct 10, 2023 – Feb 9, 2024

lore
Share & tools
lore
#0 lore raw

v3 cover disk: use maximum number of sectors for LBA

GRUB2 limits number of sectors read at once in LBA mode to the number reported in CHS disk geometry by BIOS.
This is unnecessary, as IBM/MS INT13 Extensions does not have such limit and it is safe to read up to 127 sectors in a single call.

This fixes greatly increased boot times on WYSE C10LE x86 thin client with Phoenix bios.

See: https://lore.kernel.org/grub-devel/[email protected]/

ValdikSS (2):
disk: read up to 63 sectors in LBA mode
disk: increase sector size up to 127 for LBA reads

 grub-core/disk/i386/pc/biosdisk.c | 5 ++++-
 include/grub/disk.h               | 7 +++++--
 2 files changed, 9 insertions(+), 3 deletions(-)
Signature · 7 lines
2.41.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#1 lore raw

PATCH v3 1/2 disk: read up to 63 sectors in LBA mode

Current code impose limitations on the amount of sectors read in a single call according to CHS layout of the disk, even in LBA read mode.

There's no need to obey CHS layout restrictions for LBA reads on LBA disks, it only slows down booting process.

See: https://lore.kernel.org/grub-devel/[email protected]/

---
 grub-core/disk/i386/pc/biosdisk.c | 5 ++++-
 include/grub/disk.h               | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)
grub-core/disk/i386/pc/biosdisk.c +4 -1
index f9362d17c..1d6788950 100644
@@ -471,7 +471,7 @@ grub_biosdisk_rw (int cmd, grub_disk_t disk,
       struct grub_biosdisk_dap *dap;
 
       dap = (struct grub_biosdisk_dap *) (GRUB_MEMORY_MACHINE_SCRATCH_ADDR
-					  + (data->sectors
+					  + (GRUB_DISK_MAX_LBA_SECTORS
 					     << disk->log_sector_size));
       dap->length = sizeof (*dap);
       dap->reserved = 0;
@@ -561,6 +561,9 @@ get_safe_sectors (grub_disk_t disk, grub_disk_addr_t sector)
   struct grub_biosdisk_data *data = disk->data;
   grub_uint32_t sectors = data->sectors;
 
+  if (data->flags & GRUB_BIOSDISK_FLAG_LBA)
+    sectors = GRUB_DISK_MAX_LBA_SECTORS;
+
   /* OFFSET = SECTOR % SECTORS */
   grub_divmod64 (sector, sectors, &offset);
 
include/grub/disk.h +3 -0
index a4b5d13f3..be032a72c 100644
@@ -190,6 +190,9 @@ typedef struct grub_disk_memberlist *grub_disk_memberlist_t;
 
 #define GRUB_DISK_MAX_MAX_AGGLOMERATE ((1 << (30 - GRUB_DISK_CACHE_BITS - GRUB_DISK_SECTOR_BITS)) - 1)
 
+/* Maximum number of sectors to read in LBA mode at once */
+#define GRUB_DISK_MAX_LBA_SECTORS 63
+
 /* Return value of grub_disk_native_sectors() in case disk size is unknown. */
 #define GRUB_DISK_SIZE_UNKNOWN	 0xffffffffffffffffULL
 
Signature · 7 lines
2.41.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#2 lore raw

PATCH v3 2/2 disk: increase sector size up to 127 for LBA reads

In reply to ValdikSS via Grub-devel

Increase the value from 63 to speed up reading process.

This commit increases two limits: the low-level int 13h reading code and a high-level reading code with disk cache.
The disk cache imposes an overall limitation of a higher-layer reading code. The original comment regarding 16K is incorrect, it was 512<<6 = 32768, and now it is 512<<7 = 65536.

According to [Wikipedia][1] and [OSDev][2], the upper safe value for LBA read using IBM/MS INT13 Extensions is 127 sectors due to the limitations of some BIOSes.
GRUB [already enforced][3] the limit, but it was no-op due to other constraints. This value is also used in [syslinux][4].

As we're now reading up to 127 sectors of 512 bytes, we need to be able to store in the cache up to 65024 bytes. Without this change, GRUB wouldn't try to read more than 64 sectors at once
(even if the lower reading layer allows it).

[1]: https://en.wikipedia.org/wiki/INT_13H#INT_13h_AH=42h:_Extended_Read_Sectors_From_Drive
[2]: https://wiki.osdev.org/Disk_access_using_the_BIOS_(INT_13h)#LBA_in_Extended_Mode
[3]: https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/disk/i386/pc/biosdisk.c?h=grub-2.12-rc1#n430
[4]: https://repo.or.cz/syslinux.git/blob/refs/tags/syslinux-6.03:/core/fs/diskio_bios.c#l349

---
 include/grub/disk.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/grub/disk.h +3 -3
index be032a72c..608deb034 100644
@@ -184,14 +184,14 @@ typedef struct grub_disk_memberlist *grub_disk_memberlist_t;
 #define GRUB_MDRAID_MAX_DISKS	4096
 
 /* 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
+   largest supported sector size, currently 64K.  */
+#define GRUB_DISK_CACHE_BITS	7
 #define GRUB_DISK_CACHE_SIZE	(1 << GRUB_DISK_CACHE_BITS)
 
 #define GRUB_DISK_MAX_MAX_AGGLOMERATE ((1 << (30 - GRUB_DISK_CACHE_BITS - GRUB_DISK_SECTOR_BITS)) - 1)
 
 /* Maximum number of sectors to read in LBA mode at once */
-#define GRUB_DISK_MAX_LBA_SECTORS 63
+#define GRUB_DISK_MAX_LBA_SECTORS 127
 
 /* Return value of grub_disk_native_sectors() in case disk size is unknown. */
 #define GRUB_DISK_SIZE_UNKNOWN	 0xffffffffffffffffULL
Signature · 7 lines
2.41.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#3 lore raw

Re: [PATCH v3 2/2] disk: increase sector size up to 127 for LBA reads

Quoted 19 lines · ValdikSS via Grub-devel

Increase the value from 63 to speed up reading process.

This commit increases two limits: the low-level int 13h reading code and a high-level reading code with disk cache.
The disk cache imposes an overall limitation of a higher-layer reading code. The original comment regarding 16K is incorrect, it was 512<<6 = 32768, and now it is 512<<7 = 65536.

According to [Wikipedia][1] and [OSDev][2], the upper safe value for LBA read using IBM/MS INT13 Extensions is 127 sectors due to the limitations of some BIOSes.
GRUB [already enforced][3] the limit, but it was no-op due to other constraints. This value is also used in [syslinux][4].

As we're now reading up to 127 sectors of 512 bytes, we need to be able to store in the cache up to 65024 bytes. Without this change, GRUB wouldn't try to read more than 64 sectors at once
(even if the lower reading layer allows it).

Quoted 6 lines

[1]: https://en.wikipedia.org/wiki/INT_13H#INT_13h_AH=42h:_Extended_Read_Sectors_From_Drive
[2]: https://wiki.osdev.org/Disk_access_using_the_BIOS_(INT_13h)#LBA_in_Extended_Mode
[3]: https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/disk/i386/pc/biosdisk.c?h=grub-2.12-rc1#n430
[4]: https://repo.or.cz/syslinux.git/blob/refs/tags/syslinux-6.03:/core/fs/diskio_bios.c#l349

Sadly this patch does not apply on latest master. Could you rebase it on top of it and send us updated version?

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#4 lore raw

Re: [PATCH v3 2/2] disk: increase sector size up to 127 for LBA reads

Increase the value from 63 to speed up reading process.

This commit increases two limits: the low-level int 13h reading code and a high-level reading code with disk cache.
The disk cache imposes an overall limitation of a higher-layer reading code. The original comment regarding 16K is incorrect, it was 512<<6 = 32768, and now it is 512<<7 = 65536.

According to [Wikipedia][1] and [OSDev][2], the upper safe value for LBA read using IBM/MS INT13 Extensions is 127 sectors due to the limitations of some BIOSes.
GRUB [already enforced][3] the limit, but it was no-op due to other constraints. This value is also used in [syslinux][4].

As we're now reading up to 127 sectors of 512 bytes, we need to be able to store in the cache up to 65024 bytes. Without this change, GRUB wouldn't try to read more than 64 sectors at once
(even if the lower reading layer allows it).

[1]: https://en.wikipedia.org/wiki/INT_13H#INT_13h_AH=42h:_Extended_Read_Sectors_From_Drive
[2]: https://wiki.osdev.org/Disk_access_using_the_BIOS_(INT_13h)#LBA_in_Extended_Mode
[3]: https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/disk/i386/pc/biosdisk.c?h=grub-2.12-rc1#n430
[4]: https://repo.or.cz/syslinux.git/blob/refs/tags/syslinux-6.03:/core/fs/diskio_bios.c#l349

---
 include/grub/disk.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/grub/disk.h +2 -2
index fbf23df7f..8bf6c1346 100644
@@ -184,14 +184,14 @@ typedef struct grub_disk_memberlist *grub_disk_memberlist_t;
 #define GRUB_MDRAID_MAX_DISKS	4096
 
 /* 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
+   largest supported sector size, currently 64K.  */
+#define GRUB_DISK_CACHE_BITS	7
 #define GRUB_DISK_CACHE_SIZE	(1 << GRUB_DISK_CACHE_BITS)
 
 #define GRUB_DISK_MAX_MAX_AGGLOMERATE ((1 << (30 - 

GRUB_DISK_CACHE_BITS - GRUB_DISK_SECTOR_BITS)) - 1)

/* Maximum number of sectors to read in LBA mode at once. */
-#define GRUB_DISK_MAX_LBA_SECTORS 63
+#define GRUB_DISK_MAX_LBA_SECTORS 127

/* Return value of grub_disk_native_sectors() in case disk size is
unknown. */
#define GRUB_DISK_SIZE_UNKNOWN 0xffffffffffffffffULL

Signature · 1 line
2.43.0

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#5 lore raw

Re: [PATCH v3 2/2] disk: increase sector size up to 127 for LBA reads

Daniel, just FYI, I can't send emails to your email server. It was the issue back then and it is still now. There's no web site on this domain and no contact information in whois.

<[email protected]>: host dibed.net-space.pl[84.10.22.86] said: 553 5.7.1

    Hello [185.177.150.13], for your MAIL FROM address 

<[email protected]>
policy analysis reported: Your address is not liked source for
E-mail !!!
(in reply to MAIL FROM command)

Quoted 51 lines · ValdikSS

Increase the value from 63 to speed up reading process.

This commit increases two limits: the low-level int 13h reading code and a high-level reading code with disk cache.
The disk cache imposes an overall limitation of a higher-layer reading code. The original comment regarding 16K is incorrect, it was 512<<6 = 32768, and now it is 512<<7 = 65536.

According to [Wikipedia][1] and [OSDev][2], the upper safe value for LBA read using IBM/MS INT13 Extensions is 127 sectors due to the limitations of some BIOSes.
GRUB [already enforced][3] the limit, but it was no-op due to other constraints. This value is also used in [syslinux][4].

As we're now reading up to 127 sectors of 512 bytes, we need to be able to store in the cache up to 65024 bytes. Without this change, GRUB wouldn't try to read more than 64 sectors at once
(even if the lower reading layer allows it).

[1]: https://en.wikipedia.org/wiki/INT_13H#INT_13h_AH=42h:_Extended_Read_Sectors_From_Drive
[2]: https://wiki.osdev.org/Disk_access_using_the_BIOS_(INT_13h)#LBA_in_Extended_Mode
[3]: https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/disk/i386/pc/biosdisk.c?h=grub-2.12-rc1#n430
[4]: https://repo.or.cz/syslinux.git/blob/refs/tags/syslinux-6.03:/core/fs/diskio_bios.c#l349

---
  include/grub/disk.h | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
include/grub/disk.h +3 -3
index fbf23df7f..8bf6c1346 100644
@@ -184,14 +184,14 @@ typedef struct grub_disk_memberlist 
 *grub_disk_memberlist_t;
  #define GRUB_MDRAID_MAX_DISKS    4096
 
  /* 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
+   largest supported sector size, currently 64K.  */
+#define GRUB_DISK_CACHE_BITS    7
  #define GRUB_DISK_CACHE_SIZE    (1 << GRUB_DISK_CACHE_BITS)
 
  #define GRUB_DISK_MAX_MAX_AGGLOMERATE ((1 << (30 - 
 GRUB_DISK_CACHE_BITS - GRUB_DISK_SECTOR_BITS)) - 1)
 
  /* Maximum number of sectors to read in LBA mode at once. */
-#define GRUB_DISK_MAX_LBA_SECTORS 63
+#define GRUB_DISK_MAX_LBA_SECTORS 127
 
Quoted 3 lines

 /* Return value of grub_disk_native_sectors() in case disk size is
unknown. */
 #define GRUB_DISK_SIZE_UNKNOWN     0xffffffffffffffffULL

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Reviewed-by
#6 lore raw

Re: [PATCH v3 2/2] disk: increase sector size up to 127 for LBA reads

In reply to ValdikSS via Grub-devel
Quoted 19 lines · ValdikSS via Grub-devel

Increase the value from 63 to speed up reading process.

This commit increases two limits: the low-level int 13h reading code and a high-level reading code with disk cache.
The disk cache imposes an overall limitation of a higher-layer reading code. The original comment regarding 16K is incorrect, it was 512<<6 = 32768, and now it is 512<<7 = 65536.

According to [Wikipedia][1] and [OSDev][2], the upper safe value for LBA read using IBM/MS INT13 Extensions is 127 sectors due to the limitations of some BIOSes.
GRUB [already enforced][3] the limit, but it was no-op due to other constraints. This value is also used in [syslinux][4].

As we're now reading up to 127 sectors of 512 bytes, we need to be able to store in the cache up to 65024 bytes. Without this change, GRUB wouldn't try to read more than 64 sectors at once
(even if the lower reading layer allows it).

Quoted 6 lines

[1]: https://en.wikipedia.org/wiki/INT_13H#INT_13h_AH=42h:_Extended_Read_Sectors_From_Drive
[2]: https://wiki.osdev.org/Disk_access_using_the_BIOS_(INT_13h)#LBA_in_Extended_Mode
[3]: https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/disk/i386/pc/biosdisk.c?h=grub-2.12-rc1#n430
[4]: https://repo.or.cz/syslinux.git/blob/refs/tags/syslinux-6.03:/core/fs/diskio_bios.c#l349

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#7 lore raw

Re: [PATCH v3 2/2] disk: increase sector size up to 127 for LBA reads

In reply to ValdikSS via Grub-devel

I have few concerns:
1. The name of your patch is misleading. You don't increase sector size
2. This increases memory pressure on systems that are already low on usable memory. Sparc64 comes to mind. Due to the way how off handles memory map there, even if you have a terabyte of RAM, only few MiB are usable at boot. We may need to do it dynamically, otherwise we either leave a lot of gain on systems that can read megabytes at once or we fail on low memory systems
3. Firmware bugs. Not even just BIOS. This changes all the systems. We need to review all the drivers
4. You mentioned that other implementations that increase the size of single read have a fallback. Do we have one?

Le mar. 10 oct. 2023, 21:30, ValdikSS via Grub-devel <[email protected]> a écrit :

Quoted 62 lines

Increase the value from 63 to speed up reading process.

This commit increases two limits: the low-level int 13h reading code and a high-level reading code with disk cache.
The disk cache imposes an overall limitation of a higher-layer reading code. The original comment regarding 16K is incorrect, it was 512<<6 = 32768, and now it is 512<<7 = 65536.

According to [Wikipedia][1] and [OSDev][2], the upper safe value for LBA read using IBM/MS INT13 Extensions is 127 sectors due to the limitations of some BIOSes.
GRUB [already enforced][3] the limit, but it was no-op due to other constraints. This value is also used in [syslinux][4].

As we're now reading up to 127 sectors of 512 bytes, we need to be able to store in the cache up to 65024 bytes. Without this change, GRUB wouldn't try to read more than 64 sectors at once
(even if the lower reading layer allows it).

[1]:
https://en.wikipedia.org/wiki/INT_13H#INT_13h_AH=42h:_Extended_Read_Sectors_From_Drive
[2]:
https://wiki.osdev.org/Disk_access_using_the_BIOS_(INT_13h)#LBA_in_Extended_Mode
[3]:
https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/disk/i386/pc/biosdisk.c?h=grub-2.12-rc1#n430
[4]:
https://repo.or.cz/syslinux.git/blob/refs/tags/syslinux-6.03:/core/fs/diskio_bios.c#l349

---
 include/grub/disk.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/grub/disk.h +3 -3
index be032a72c..608deb034 100644
@@ -184,14 +184,14 @@ typedef struct grub_disk_memberlist
 *grub_disk_memberlist_t;
 #define GRUB_MDRAID_MAX_DISKS  4096
 
 /* 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
+   largest supported sector size, currently 64K.  */
+#define GRUB_DISK_CACHE_BITS   7
 #define GRUB_DISK_CACHE_SIZE   (1 << GRUB_DISK_CACHE_BITS)
 
 #define GRUB_DISK_MAX_MAX_AGGLOMERATE ((1 << (30 - GRUB_DISK_CACHE_BITS -
 GRUB_DISK_SECTOR_BITS)) - 1)
 
 /* Maximum number of sectors to read in LBA mode at once */
-#define GRUB_DISK_MAX_LBA_SECTORS 63
+#define GRUB_DISK_MAX_LBA_SECTORS 127
 

/* Return value of grub_disk_native_sectors() in case disk size is
unknown. */
#define GRUB_DISK_SIZE_UNKNOWN 0xffffffffffffffffULL
--
2.41.0

Quoted 5 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#8 lore raw

Re: [PATCH v3 2/2] disk: increase sector size up to 127 for LBA reads

Quoted 2 lines · Vladimir 'phcoder' Serbinenko

I have few concerns:
1. The name of your patch is misleading. You don't increase sector size

+
Do you want me to resend the patch or you'll rename it yourself?

Quoted 1 line

2. This increases memory pressure on systems that are already low on usable memory. Sparc64 comes to mind. Due to the way how off handles memory map there, even if you have a terabyte of RAM, only few MiB are usable at boot. We may need to do it dynamically, otherwise we either leave a lot of gain on systems that can read megabytes at once or we fail on low memory systems

I don't know anything about boot process of SPARC64 (I don't know about x86 much to begin with).

Quoted 1 line

3. Firmware bugs. Not even just BIOS. This changes all the systems. We need to review all the drivers

If the patch may break some systems, better not to merge it. It doesn't bring that major speed gain, and measurably speeds the booting process only on legacy machines with not very optimized BIOS calls.

It's not worth it.

Quoted 1 line

4. You mentioned that other implementations that increase the size of single read have a fallback. Do we have one?

Yes, CHR reading is used if MBR has failed.

P.S. please include my email when you send me the messages, I saw this maillist-only post only by pure coincidence.

Quoted 74 lines

Le mar. 10 oct. 2023, 21:30, ValdikSS via Grub-devel <[email protected] <mailto:[email protected]>> a écrit :

    Increase the value from 63 to speed up reading process.

    This commit increases two limits: the low-level int 13h reading code
    and a high-level reading code with disk cache.
    The disk cache imposes an overall limitation of a higher-layer reading
    code. The original comment regarding 16K is incorrect, it was
    512<<6 = 32768, and now it is 512<<7 = 65536.

    According to [Wikipedia][1] and [OSDev][2], the upper safe value for LBA
    read using IBM/MS INT13 Extensions is 127 sectors due to the
    limitations of some BIOSes.
    GRUB [already enforced][3] the limit, but it was no-op due to other
    constraints. This value is also used in [syslinux][4].

    As we're now reading up to 127 sectors of 512 bytes, we need to be able
    to store in the cache up to 65024 bytes. Without this change, GRUB
    wouldn't try to read more than 64 sectors at once
    (even if the lower reading layer allows it).

    [1]:
    https://en.wikipedia.org/wiki/INT_13H#INT_13h_AH=42h:_Extended_Read_Sectors_From_Drive <https://en.wikipedia.org/wiki/INT_13H#INT_13h_AH=42h:_Extended_Read_Sectors_From_Drive>
    [2]:
    https://wiki.osdev.org/Disk_access_using_the_BIOS_(INT_13h)#LBA_in_Extended_Mode <https://wiki.osdev.org/Disk_access_using_the_BIOS_(INT_13h)#LBA_in_Extended_Mode>
    [3]:
    https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/disk/i386/pc/biosdisk.c?h=grub-2.12-rc1#n430 <https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/disk/i386/pc/biosdisk.c?h=grub-2.12-rc1#n430>
    [4]:
    https://repo.or.cz/syslinux.git/blob/refs/tags/syslinux-6.03:/core/fs/diskio_bios.c#l349 <https://repo.or.cz/syslinux.git/blob/refs/tags/syslinux-6.03:/core/fs/diskio_bios.c#l349>

    Signed-off-by: ValdikSS <[email protected]
    <mailto:[email protected]>>
    ---
      include/grub/disk.h | 6 +++---
      1 file changed, 3 insertions(+), 3 deletions(-)

    diff --git a/include/grub/disk.h b/include/grub/disk.h
    index be032a72c..608deb034 100644
    --- a/include/grub/disk.h
    +++ b/include/grub/disk.h
    @@ -184,14 +184,14 @@ typedef struct grub_disk_memberlist
    *grub_disk_memberlist_t;
      #define GRUB_MDRAID_MAX_DISKS  4096

      /* 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
    +   largest supported sector size, currently 64K.  */
    +#define GRUB_DISK_CACHE_BITS   7
      #define GRUB_DISK_CACHE_SIZE   (1 << GRUB_DISK_CACHE_BITS)

      #define GRUB_DISK_MAX_MAX_AGGLOMERATE ((1 << (30 -
    GRUB_DISK_CACHE_BITS - GRUB_DISK_SECTOR_BITS)) - 1)

      /* Maximum number of sectors to read in LBA mode at once */
    -#define GRUB_DISK_MAX_LBA_SECTORS 63
    +#define GRUB_DISK_MAX_LBA_SECTORS 127

      /* Return value of grub_disk_native_sectors() in case disk size is
    unknown. */
      #define GRUB_DISK_SIZE_UNKNOWN  0xffffffffffffffffULL
    -- 
    2.41.0


    _______________________________________________
    Grub-devel mailing list
    [email protected] <mailto:[email protected]>
    https://lists.gnu.org/mailman/listinfo/grub-devel
    <https://lists.gnu.org/mailman/listinfo/grub-devel>
Quoted 4 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#9 lore raw
In reply to ValdikSS via Grub-devel
Quoted 5 lines · ValdikSS via Grub-devel

GRUB2 limits number of sectors read at once in LBA mode to the number reported in CHS disk geometry by BIOS.
This is unnecessary, as IBM/MS INT13 Extensions does not have such limit and it is safe to read up to 127 sectors in a single call.

Quoted 8 lines

This fixes greatly increased boot times on WYSE C10LE x86 thin client with Phoenix bios.

See: https://lore.kernel.org/grub-devel/[email protected]/

ValdikSS (2):
disk: read up to 63 sectors in LBA mode
disk: increase sector size up to 127 for LBA reads

For both patches Reviewed-by: Daniel Kiper <[email protected]>...

I will take patch #1 right now. The patch #2 will be merged after the release.

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel