diff options
| author | eunhhu <[email protected]> | 2026-09-30 08:35:40 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-30 08:35:40 +0100 |
| commit | 18aa391cbfdaca1bd259f69cc8d7d78984cc9047 (patch) | |
| tree | f63e1e44aa582d0606bb412f41b7d54c803e655a /core/module-list.h | |
| parent | d98f80dde3052acae503c589e15b5243afb864b7 (diff) | |
| download | pure-18aa391cbfdaca1bd259f69cc8d7d78984cc9047.tar.gz pure-18aa391cbfdaca1bd259f69cc8d7d78984cc9047.zip | |
Let a list make its next nodes of those no snapshot reads any more
Each node a list copies once a snapshot shares it went, once the last
snapshot that could read it was released, back to the system: a leaf of
TPC-C's (1.3 KB) past glibc's thread cache, often freed by a connection
thread into the owner's arena, while the owner allocated the next. That
was 70% of what snapshots cost the owner. Now what no snapshot reads
comes back to the app under the register's lock, and each snapshot the
owner makes hands it to the lists of its size as spares, as many as each
made lately; retired entries carry what the pass and the reuse ask of a
node, so neither reads it again. TPC-C in RAM, W=1, 64 terminals: 10-14%
more a second at 7% less CPU a transaction, resident 1.97x the state
bytes where it was 2.18x (docs/research/107).
Diffstat (limited to 'core/module-list.h')
| -rw-r--r-- | core/module-list.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/module-list.h b/core/module-list.h index abe19cb..d97aa77 100644 --- a/core/module-list.h +++ b/core/module-list.h @@ -69,8 +69,15 @@ PureList *pure_list_share(PureList *, PureRetired *retired, uint64_t epoch); void pure_list_mark(PureList *, uint64_t epoch); /* Of what was retired, what a copy of epoch may still read (made before * it) goes to kept (none when kept is NULL), and the rest to gone, for - * pure_retired_free (later, and where it pleases): from is left empty. */ + * pure_retired_reuse or pure_retired_free (later, and where it pleases): + * from is left empty, with its room (pure_retired_free lets that go). */ void pure_retired_pass(PureRetired *from, uint64_t epoch, PureRetired *kept, PureRetired *gone); +/* What was retired and no copy reads any more, on the lists' thread: each + * node goes back to a list of its size, to be made again, as many as the + * list made lately (at least a few: what it made counts half again at each + * return); the rest and the texts are freed. returned is left empty, with + * its room. */ +void pure_retired_reuse(PureRetired *returned, PureList *const *lists, unsigned count); void pure_list_hold(PureList *copy); /* Whether copy shares list's items as they are now. */ bool pure_list_current(const PureList *copy, const PureList *list); |
