Qi Wang
add636596a
Stop checking head state in the merge hook.
...
Now that all merging go through try_acquire_edata_neighbor, the mergeablility
checks (including head state checking) are done before reaching the merge hook.
In other words, merge hook will never be called if the head state doesn't agree.
2021-03-29 17:19:53 -07:00
David T. Goldblatt
9f4fc27389
Ehooks: Fix a build warning.
...
We wrote `return some_void_func()` in a function returning void, which is
confusing and triggers warnings on MSVC.
2020-02-25 10:21:03 -08:00
David Goldblatt
6342da0970
Ehooks: Further optimize default merge case.
...
This avoids the cost of an iealloc in cases where the user uses the default
merge hook without using the default extent hooks.
2019-12-20 10:18:40 -08:00
David Goldblatt
9cad5639ff
Ehooks: remove arena_ind parameter.
...
This lives within the ehooks_t now, so that callers don't need to know it.
2019-12-20 10:18:40 -08:00
David Goldblatt
57fe99d4be
Move relevant index into the ehooks_t itself.
...
It's always passed into the ehooks; keeping it colocated lets us avoid passing
the arena everywhere.
2019-12-20 10:18:40 -08:00
David Goldblatt
0704516245
Ehooks: Add head tracking.
2019-12-20 10:18:40 -08:00
David Goldblatt
09475bf8ac
extent_may_dalloc -> ehooks_dalloc_will_fail
2019-12-20 10:18:40 -08:00
David Goldblatt
a738a66b5c
Ehooks: Add some debug zero and addr checks.
...
These help make sure that the ehooks return properly zeroed memory when required
to.
2019-12-20 10:18:40 -08:00
David Goldblatt
4b2e5ee8b9
Ehooks: Add a "zero" ehook.
...
This is the first API expansion. It lets the hooks pick where and how to purge
within themselves.
2019-12-20 10:18:40 -08:00
David Goldblatt
39fdc690a0
Ehooks comments and cleanup.
2019-12-20 10:18:40 -08:00
David Goldblatt
c8dae890c8
Extent -> Ehooks: Move over default hooks.
2019-12-20 10:18:40 -08:00
David Goldblatt
2fe5108263
Extent -> Ehooks: Move merge hook.
2019-12-20 10:18:40 -08:00
David Goldblatt
1fff4d2ee3
Extent -> Ehooks: Move split hook.
2019-12-20 10:18:40 -08:00
David Goldblatt
a5b42a1a10
Extent -> Ehooks: Move purge_forced hook.
2019-12-20 10:18:40 -08:00
David Goldblatt
368baa42ef
Extent -> Ehooks: Move purge_lazy hook.
2019-12-20 10:18:40 -08:00
David Goldblatt
d78fe241ac
Extent -> Ehooks: Move commit and decommit hooks.
2019-12-20 10:18:40 -08:00
David Goldblatt
5459ec9dae
Extent -> Ehooks: Move destroy hook.
2019-12-20 10:18:40 -08:00
David Goldblatt
bac8e2e5a6
Extent -> Ehooks: Move dalloc hook.
2019-12-20 10:18:40 -08:00
David Goldblatt
dc8b4e6e13
Extent -> Ehooks: Move alloc hook.
2019-12-20 10:18:40 -08:00
David Goldblatt
ae0d8e8591
Move extent ehook calls into ehooks
2019-12-20 10:18:40 -08:00
David Goldblatt
ba8b9ecbcb
Add ehooks module
2019-12-20 10:18:40 -08:00