Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c9065640 authored by Adrien Schildknecht's avatar Adrien Schildknecht Committed by Daniel Rosenberg
Browse files

ANDROID: Squashfs: optimize reading uncompressed data



When dealing with uncompressed data, there is no need to read a whole
block (default 128K) to get the desired page: the pages are
independent from each others.

This patch change the readpages logic so that reading uncompressed
data only read the number of pages advised by the readahead algorithm.

Moreover, if the page actor contains holes (i.e. pages that are already
up-to-date), squashfs skips the buffer_head associated to those pages.

This patch greatly improve the performance of random reads for
uncompressed files because squashfs only read what is needed. It also
reduces the number of unnecessary reads.

Signed-off-by: default avatarAdrien Schildknecht <adriens@google.com>
Signed-off-by: default avatarDaniel Rosenberg <drosen@google.com>
Change-Id: I6cd34031a49fc4844e28fa749ef0df4e0df5ee71
parent 34193964
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment