Commit 1acd75fc authored by Petr Tesarik's avatar Petr Tesarik Committed by Atsushi Kumagai
Browse files

[PATCH v3 7/7] cache: store mapped regions directly in the cache.



Avoid copying data between the mmapped region and the cache. To do that,
readmem() tries to map the page before reading it. The mmap path and
the read path are separated: mappage_elf() uses the mmap syscall, and
readpage_elf() uses the read syscall.

If mmap is successful, readmem() stores the mmap address in the cache
entry. Of course, the mapping must not be removed until the cache entry
is evicted, but the cache code has no knowledge about mmap. To solve that
in a flexible way, a discard callback is added to struct cache_entry and
called by cache eviction code.

Signed-off-by: default avatarPetr Tesarik <ptesarik@suse.cz>
parent 5881f233
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment