flash-kernel is extremely slow on raspi

Bug #1965129 reported by Dave Jones
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
flash-kernel (Ubuntu)
Fix Released
Undecided
Dave Jones
Jammy
Fix Released
Undecided
Dave Jones

Bug Description

Currently flash-kernel takes at least 1 and a half minutes (on fast SSD storage) to execute on a Raspberry Pi. This is partly because a considerable number of files are transferred compared to other platforms (all supported dtbs, and their overlays, along with the kernel and initrd which totals several hundred copy operations in all). However, a large part of this is that "maybe_defrag" is called at the end of "backup_and_install".

The "maybe_defrag" function checks the f-k database for the "Bootloader-Has-Broken-Ext4-Extent-Support" flag to determine whether a defragmentation run is required (it's not on Pi models). Unfortunately, it checks this *every time* and the check is fairly expensive (involves bash parsing the f-k database). If this value is cached (as many other values from the database are), this reduces the overall f-k runtime to ~22 seconds (again, on fast SSD storage).

Dave Jones (waveform)
Changed in flash-kernel (Ubuntu):
assignee: nobody → Dave Jones (waveform)
milestone: none → ubuntu-22.04
Changed in flash-kernel (Ubuntu Jammy):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package flash-kernel - 3.104ubuntu9

---------------
flash-kernel (3.104ubuntu9) jammy; urgency=medium

  * Cache lookup of Bootloader-Has-Broken-Ext4-Extent-Support for significant
    performance improvement on Raspberry Pi (LP: #1965129)
  * Added note in db/all.db above Pi entries about "incorrect" DTB-Id
    (LP: #1928314)
  * Add raspi-nolpae kernel flavor to all supported boards (LP: #1962312)
  * Added entries for the Pi 4B rev 1.5, and moved CM4 and 400 models to their
    own entries for the sake of clarity
  * Include overlays/README in the files copied by Method: pi

 -- Dave Jones <email address hidden> Mon, 18 Apr 2022 12:13:13 +0100

Changed in flash-kernel (Ubuntu Jammy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.