mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
hash: use kernel readahead instead of bees_readahead to prefetch hash table
The hash table is read sequentially and from a single thread, so the kernel's implementation of readahead is appropriate here. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
37f5b1bfa8
commit
cdcdf8e218
@ -446,8 +446,8 @@ BeesHashTable::fetch_missing_extent_by_index(uint64_t extent_index)
|
|||||||
|
|
||||||
// If we are in prefetch, give the kernel a hint about the next extent
|
// If we are in prefetch, give the kernel a hint about the next extent
|
||||||
if (m_prefetch_running) {
|
if (m_prefetch_running) {
|
||||||
// XXX: don't call this if bees_readahead is implemented by pread()
|
// Use the kernel readahead here, because it might work for this use case
|
||||||
bees_readahead(m_fd, dirty_extent_offset + dirty_extent_size, dirty_extent_size);
|
readahead(m_fd, dirty_extent_offset + dirty_extent_size, dirty_extent_size);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user