[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Does/can DLB order the disk blocks in the order they are accessed during a default boot?



Hi,

Martin Guy wrote:
> [...] ensure that the required blocks
> are in the ISO in linear disk-reading order, which should speed boot
> time from optical media.

Not necessarily. DVD readers often deliver data from the high block
adresses about two times faster than from the low addresses. So it
would be worth to store really large files at the ISO's end, if they
need several seconds to be read. Candidates would be initrds and squashfs.


> I guess that means booting the ISO image during the build in something
> virtual, with a magic kernel option to make it spew all the disk
> access addresses, then reorder the ISO accordingly.

I'd propose this number fountain to be implemented in isofs_readpage()
and isofs_readahead() (before 5.8: isofs_readpages()) of fs/isofs/inode.c.
(Caution: PAGE_SIZE differs between architectures.)


Then you need the output of

  xorriso -indev "$ISO" -find / -type f -sort_lba -exec report_lba -- \
    | grep '^File data lba:'

Each line gives (sorted by StartLba):
  Report layout: xt , Startlba ,   Blocks , Filesize , ISO image path
e.g.
  File data lba:  0 ,      383 ,        0 ,        0 , '/.disk/base_installable'
  File data lba:  0 ,      385 ,     1472 ,  3014656 , '/boot/grub/efi.img'
  File data lba:  0 ,     1857 ,       19 ,    38912 , '/isolinux/isolinux.bin'
  ...

So with a given byte address you can find the Rockridge path of the
file which governs that byte as its content.


xorriso -as mkisofs has an option --sort-weight-list by which you can
feed it with a file containing pairs of weight number and path in the
ISO filesystem. The higher the weight number, the lower the block address
of the file content will be when the ISO gets produced.


Have a nice day :)

Thomas


Reply to: