David Goldblatt
e2cf3fb1a3
PA: Move in all modifications of mapped.
2020-04-10 13:12:47 -07:00
David Goldblatt
436789ad96
PA: Make mapped stat atomic.
...
We always have atomic_zu_t, and mapped/unmapped transitions are always expensive
enough that trying to piggyback on a lock is a waste of time.
2020-04-10 13:12:47 -07:00
David Goldblatt
3c28aa6f17
PA: Move edata_avail stat in, make it non-atomic.
2020-04-10 13:12:47 -07:00
David Goldblatt
f6bfa3dcca
Move extent stats to the PA module.
...
While we're at it, make them non-atomic -- they are purely derived statistics
(and in fact aren't even in the arena_t or pa_shard_t).
2020-04-10 13:12:47 -07:00
David Goldblatt
527dd4cdb8
PA: Move in nactive counter.
2020-04-10 13:12:47 -07:00
David Goldblatt
c075fd0bcb
PA: Minor cleanups and comment fixes.
2020-04-10 13:12:47 -07:00
David Goldblatt
46a9d7fc0b
PA: Move in rest of purging.
2020-04-10 13:12:47 -07:00
David Goldblatt
2d6eec7b5c
PA: Move in decay-all pathway.
2020-04-10 13:12:47 -07:00
David Goldblatt
65698b7f2e
PA: Remove public visibility of some internals.
2020-04-10 13:12:47 -07:00
David Goldblatt
f012c43be0
PA: Move in decay_to_limit
2020-04-10 13:12:47 -07:00
David Goldblatt
103f5feda5
Move bg thread activity check out of purging core.
2020-04-10 13:12:47 -07:00
David Goldblatt
3034f4a508
PA: Move in decay_stashed.
2020-04-10 13:12:47 -07:00
David Goldblatt
aef28b2f8f
PA: Move in stash_decayed.
2020-04-10 13:12:47 -07:00
David Goldblatt
655a096343
Move bg inactivity check out of purge inner loop.
...
I.e. do it once per call to arena_decay_stashed instead of once per muzzy purge.
2020-04-10 13:12:47 -07:00
David Goldblatt
71fc0dc968
PA: Move in remaining page allocation functions.
2020-04-10 13:12:47 -07:00
David Goldblatt
74958567a4
PA: have expand take sizes instead of new usize.
...
This avoids involving usize, which makes some of the stats modifications more
intuitively correct.
2020-04-10 13:12:47 -07:00
David Goldblatt
5bcc2c2ab9
PA: Have expand take szind and slab.
...
This isn't really necessary, but having a uniform API will help us later.
2020-04-10 13:12:47 -07:00
David Goldblatt
0880c2ab97
PA: Have large expands use it.
2020-04-10 13:12:47 -07:00
David Goldblatt
7be3dea82c
PA: Have slab allocations use it.
2020-04-10 13:12:47 -07:00
David Goldblatt
9f93625c14
PA: Move in arena large allocation functionality.
2020-04-10 13:12:47 -07:00
David Goldblatt
7624043a41
PA: Add ehook-getting support.
2020-04-10 13:12:47 -07:00
David Goldblatt
eba35e2e48
Remove extent knowledge of arena.
2020-04-10 13:12:47 -07:00
David Goldblatt
e77f47a85a
Move arena decay getters to PA.
2020-04-10 13:12:47 -07:00
David Goldblatt
f77cec311e
Decay: Take current time as an argument.
...
This better facilitates testing.
2020-04-10 13:12:47 -07:00
David Goldblatt
d1d7e1076b
Decay: move in some background_thread accesses.
2020-04-10 13:12:47 -07:00
David Goldblatt
8f2193dc8d
Decay: Move in arena decay functions.
2020-04-10 13:12:47 -07:00
David Goldblatt
4d090d23f1
Decay: Introduce a stub .c file.
2020-04-10 13:12:47 -07:00
David Goldblatt
7b62885476
Introduce decay module and put decay objects in PA
2020-04-10 13:12:47 -07:00
David Goldblatt
3192d6b77d
Extents: Have extent_dalloc_gap take ehooks.
...
We're almost to the point where the extent code doesn't know about arenas at
all. In that world, we shouldn't pull them out of the arena.
2020-04-10 13:12:47 -07:00
David Goldblatt
22a0a7b93a
Move arena_decay_extent to extent module.
2020-04-10 13:12:47 -07:00
David Goldblatt
70d12ffa05
PA: Move mapped into pa stats.
2020-04-10 13:12:47 -07:00
David Goldblatt
ce8c0d6c09
PA: Move in arena extent_sn counter.
...
Just another step towards making PA self-contained.
2020-04-10 13:12:47 -07:00
David Goldblatt
1ada4aef84
PA: Get rid of arena_ind_get calls.
...
This is another step on the path towards breaking the extent reliance on the
arena module.
2020-04-10 13:12:47 -07:00
David Goldblatt
1ad368c8b7
PA: Move in decay stats.
2020-04-10 13:12:47 -07:00
David Goldblatt
356aaa7dc6
Introduce lockedint module.
...
This pulls out the various abstractions where some stats counter is sometimes an
atomic, sometimes a plain variable, sometimes always protected by a lock,
sometimes protected by reads but not writes, etc. With this change, these cases
are treated consistently, and access patterns tagged.
In the process, we fix a few missed-update bugs (where one caller assumes
"protected-by-a-lock" semantics and another does not).
2020-04-10 13:12:47 -07:00
David Goldblatt
acd0bf6a26
PA: move in ecache_grow.
2020-04-10 13:12:47 -07:00
David Goldblatt
32cb7c2f0b
PA: Add a stats type.
2020-04-10 13:12:47 -07:00
David Goldblatt
688fb3eb89
PA: Move in the arena edata_cache.
2020-04-10 13:12:47 -07:00
David Goldblatt
8433ad84ea
PA: move in shard initialization.
2020-04-10 13:12:47 -07:00
David Goldblatt
a24faed569
PA: Move in the ecache_t objects.
2020-04-10 13:12:47 -07:00
David Goldblatt
585f925055
Move cache index randomization out of extent.
...
This is logically at a higher level of the stack; extent should just allocate
things at the page-level; it shouldn't care exactly why the callers wants a
given number of pages.
2020-04-10 13:12:47 -07:00
David Goldblatt
12be9f5727
Add a stub PA module -- a page allocator.
2020-04-10 13:12:47 -07:00
Yinan Zhang
c4e9ea8cc6
Get rid of locks in prof recent test
2020-04-07 17:22:24 -07:00
Yinan Zhang
2deabac079
Get rid of custom iterator for last-N records
2020-04-07 17:22:24 -07:00
Yinan Zhang
a5ddfa7d91
Use ql for prof last-N list
2020-04-07 17:22:24 -07:00
Yinan Zhang
f9aad7a49b
Add piping API to buffered writer
2020-04-01 09:41:20 -07:00
Yinan Zhang
09cd79495f
Encapsulate buffer allocation failure in buffered writer
2020-04-01 09:41:20 -07:00
Yinan Zhang
a166c20818
Make prof_tctx_t pointer a true prof atomic fence
2020-03-31 17:43:42 -07:00
David T. Goldblatt
d936b46d3a
Add malloc_conf_2_conf_harder
...
This comes in handy when you're just a user of a canary system who wants to
change settings set by the configuration system itself.
2020-03-31 06:25:08 -07:00
Yinan Zhang
2256ef8961
Add option to fetch system thread name on each prof sample
2020-03-24 21:39:57 -07:00