Files
mesa/src/util
Juston Li 3b69b67545 util/fossilize_db: add runtime RO foz db loading via FOZ_DBS_DYNAMIC_LIST
Add a new environment varible
MESA_DISK_CACHE_READ_ONLY_FOZ_DBS_DYNAMICE_LIST that specifies a text
file containing a list of RO fossilize caches to load. The list file
is modifiable at runtime to allow for loading RO caches after
initialization unlike MESA_DISK_CACHE_READ_ONLY_FOZ_DBS.

The implementation spawns an updater thread that uses inotify to monitor
the list file for modifications, attempting to load new foz dbs added to
the list. Removing files from the list will not evict a loaded cache.

MESA_DISK_CACHE_READ_ONLY_FOZ_DBS_DYNAMIC_LIST takes an absolute path.
The file must exist at initialization for updating to occur.

File names of foz dbs in the list file are new-line separated and take
relative paths to the default cache directory like
MESA_DISK_CACHE_READ_ONLY_FOZ_DBS.

The maximum number of RO foz dbs is kept to 8 and is shared between
MESA_DISK_CACHE_READ_ONLY_FOZ_DBS_DYNAMIC_LIST and
MESA_DISK_CACHE_READ_ONLY_FOZ_DBS.

The intended use case for this feature is to allow prebuilt caches
to be downloaded and loaded asynchronously during app runtime.
Prebuilt caches be large (several GB) and depending on network
conditions would otherwise present extended wait time for caches
to be availible before app launch.
This will be used in Chrome OS.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19328>
2023-01-16 16:15:45 +00:00
..
2022-07-07 12:25:05 +00:00
2022-04-22 19:38:52 +00:00
2022-09-29 23:40:18 +00:00
2022-09-29 23:40:18 +00:00
2022-06-02 13:09:16 +00:00
2021-08-14 21:44:32 +00:00
2022-11-14 20:13:20 +00:00
2022-08-26 21:47:44 +00:00
2023-01-04 01:09:32 +00:00
2021-10-20 21:40:31 -07:00
2022-06-02 13:09:16 +00:00
2022-11-04 23:20:02 +00:00
2022-11-04 23:20:02 +00:00
2022-03-09 08:48:59 +00:00
2022-03-09 08:48:59 +00:00
2022-08-04 23:53:49 +00:00
2022-11-24 04:33:07 +00:00
2022-05-17 21:02:24 +00:00
2022-12-17 19:14:12 +00:00
2022-12-17 19:14:12 +00:00
2021-08-14 21:44:32 +00:00
2020-12-01 10:04:41 +01:00