diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-04-24 17:44:14 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-05-13 16:45:51 +0200 |
commit | 134b450cb65b1986c78e0b292cff78c2f1882a2b (patch) | |
tree | 331c2a170decbe42ae34b0df2bc609942744ab6b /libdiskfs/conch-fetch.c | |
parent | 261d957ebe4cf16aed76eed24b5bfd32f1f5a79a (diff) |
ext2fs: cache the superblock
Previously, the superblock was mmaped and a pointer stored in sblock
by map_hypermetadata. This memory is backed by our disk pager.
This is rather unfortunate, as this means that whenever we read a
value from that location, we might generate a request our disk pager.
This amplifies the so-called thread-storm problem.
Rather than relying on a mmaped region of memory, just use the data
loaded by get_hypermetadata.
* ext2fs/hyper.c (get_hypermetadata): Do not free sblock.
(mapped_sblock): New variable.
(map_hypermetadata): Map the superblock to mapped_sblock instead.
(diskfs_set_hypermetadata): Copy superblock into mapped_superblock.
* ext2fs/ext2fs.h (get_hypermetadata, map_hypermetadata): Adjust
comments accordingly.
Diffstat (limited to 'libdiskfs/conch-fetch.c')
0 files changed, 0 insertions, 0 deletions