David Goldblatt
9b5ca0b09d
Emap: Move in slab interior registration.
2020-02-17 10:50:51 -08:00
David Goldblatt
d05b61db4a
Emap: Move extent boundary registration in.
2020-02-17 10:50:51 -08:00
David Goldblatt
ca21ce4071
Emap: Move in write_acquired from extent.
2020-02-17 10:50:51 -08:00
David Goldblatt
01f255161c
Add emap, for tracking extent locking.
2020-02-17 10:50:51 -08:00
Qi Wang
ba0e35411c
Rework the bin locking around tcache refill / flush.
...
Previously, tcache fill/flush (as well as small alloc/dalloc on the arena) may
potentially drop the bin lock for slab_alloc and slab_dalloc. This commit
refactors the logic so that the slab calls happen in the same function / level
as the bin lock / unlock. The main purpose is to be able to use flat combining
without having to keep track of stack state.
In the meantime, this change reduces the locking, especially for slab_dalloc
calls, where nothing happens after the call.
2020-02-13 23:31:54 -08:00
Kamil Rytarowski
7fd22f7b2e
Fix Undefined Behavior in hash.h
...
hash.h:200:27, left shift of 250 by 24 places cannot be represented in type 'int'
2020-02-13 12:25:26 -08:00
Yinan Zhang
9cac3fa8f5
Encapsulate buffer allocation in buffered writer
2020-02-04 13:21:58 -08:00
Yinan Zhang
bdc08b5158
Better naming buffered writer
2020-02-04 13:21:58 -08:00
Qi Wang
c6bfe55857
Update the tsd description.
2020-02-04 13:07:05 -08:00
Qi Wang
e896522616
Abbreviate thread-event to te.
2020-02-04 13:07:05 -08:00
Qi Wang
5e500523a0
Remove thread_event_boot().
2020-02-04 00:18:15 -08:00
Qi Wang
97dd79db6c
Implement deallocation events.
...
Make the event module to accept two event types, and pass around the event
context. Use bytes-based events to trigger tcache GC on deallocation, and get
rid of the tcache ticker.
2020-02-04 00:18:15 -08:00
Qi Wang
974222c626
Add safety check on sdallocx slow / sampled path.
2020-01-31 00:04:22 -08:00
Qi Wang
88d9eca848
Enforce page alignment for sampled allocations.
...
This allows sampled allocations to be checked through alignment, therefore
enable sized deallocation regardless of cache_oblivious.
2020-01-31 00:04:22 -08:00
Qi Wang
0f552ed673
Don't purge huge extents when decay is off.
2020-01-30 14:40:38 -08:00
Qi Wang
38a48e5741
Set reentrancy to 1 for tsd_state_purgatory.
...
Reentrancy is already set for other non-nominal tsd states (reincarnated and
minimal_initialized). Add purgatory to be safe and consistent.
2020-01-30 13:55:20 -08:00
Qi Wang
88b0e03a4e
Implement opt.stats_interval and the _opts options.
...
Add options stats_interval and stats_interval_opts to allow interval based stats
printing. This provides an easy way to collect stats without code changes,
because opt.stats_print may not work (some binaries never exit).
2020-01-29 09:57:55 -08:00
Qi Wang
d71a145ec1
Chagne prof_accum_t to counter_accum_t for general purpose.
2020-01-29 09:57:55 -08:00
Yinan Zhang
f81341a48b
Fallback to unbuffered printing if OOM
2020-01-21 17:09:44 -08:00
David Goldblatt
bd3be8e0b1
Remove commit parameter to ecache functions.
...
No caller ever wants uncommitted memory.
2020-01-17 10:54:56 -08:00
Qi Wang
dab81bd315
Rework and fix the assertions on malloc fastpath.
...
The first half of the malloc fastpath may execute before malloc_init. Make the
assertions work in that case.
2020-01-14 15:00:41 -08:00
Yinan Zhang
2b604a3016
Record request size in prof recent entries
2020-01-10 12:01:01 -08:00
Yinan Zhang
40a391408c
Define constructor for buffered writer argument
2020-01-10 11:59:02 -08:00
Yinan Zhang
6d8e616902
Make buffered writer an independent module
2020-01-10 11:59:02 -08:00
Yinan Zhang
6b6b4709b3
Unify buffered writer naming
2020-01-09 14:31:31 -08:00
Yinan Zhang
9a60cf54ec
Last-N profiling mode
2019-12-30 15:58:57 -08:00
Yinan Zhang
7a27a05940
Delete tdata states used for cleanup
2019-12-30 15:58:57 -08:00
Yinan Zhang
e98ddf7987
Fix unlikely condition in arena_prof_info_get()
2019-12-30 15:58:57 -08:00
Yinan Zhang
3fa142cf39
Remove _externs from prof internal header names
2019-12-23 11:14:15 -08:00
Yinan Zhang
112dc36dd5
Handle log_mtx during forking
2019-12-20 17:17:48 -08:00
Yinan Zhang
ea42174d07
Refactor profiling headers
2019-12-20 17:17:48 -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
e210ccc57e
Move extent2 -> extent.
...
Eventually, we may fully break off the extent module; but not for some time. If
it's going to live on in a non-transitory state, it might as well have the nicer
name.
2019-12-20 10:18:40 -08:00
David Goldblatt
2f4fa80414
Rename extents -> ecache.
2019-12-20 10:18:40 -08:00
David Goldblatt
56cc56b692
Break extent split dependence on arena.
2019-12-20 10:18:40 -08:00
David Goldblatt
0aa9769fb0
Break commit functions' arena dependence
2019-12-20 10:18:40 -08:00
David Goldblatt
576d7047ab
Ecache: Should know its arena_ind.
...
What we call an arena_ind is really the index associated with some particular
set of ehooks; the arena is just the user-visible portion of that. Making this
explicit, and reframing checks in terms of that, makes the code simpler and
cleaner, and helps us avoid passing the arena itself all throughout extent code.
This lets us put back an arena-specific assert.
2019-12-20 10:18:40 -08:00
David Goldblatt
372042a082
Remove merge dependence on the arena.
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
c792f3e4ab
edata_cache: Remember the associated base_t.
...
This will save us some trouble down the line when we stop passing arena pointers
everywhere; we won't have to pass around a base_t pointer either.
2019-12-20 10:18:40 -08:00
David Goldblatt
ae23e5f426
Unify extent_alloc_wrapper with the other wrappers.
...
Previously, it was really more like extents_alloc (it looks in an ecache for an
extent to reuse as its primary allocation pathway). Make that pathway more
explciitly like extents_alloc, and rename extent_alloc_wrapper_hard accordingly.
2019-12-20 10:18:40 -08:00
David Goldblatt
d8b0b66c6c
Put extent_state_t into ecache as well as eset.
2019-12-20 10:18:40 -08:00
David Goldblatt
98eb40e563
Move delay_coalesce from the eset to the ecache.
2019-12-20 10:18:40 -08:00
David Goldblatt
bb70df8e5b
Extent refactor: Introduce ecache module.
...
This will eventually completely wrap the eset, and handle concurrency,
allocation, and deallocation. For now, we only pull out the mutex from the
eset.
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
7859184179
Pull out edata_t caching into its own module.
2019-12-20 10:18:40 -08:00
David Goldblatt
a7862df616
Rename extent_t to edata_t.
...
This frees us up from the unfortunate extent/extent2 naming collision.
2019-12-20 10:18:40 -08:00
David Goldblatt
865debda22
Rename extent.h -> edata.h.
...
This name is slightly pithier; a full-on rename will come shortly.
2019-12-20 10:18:40 -08:00