Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
slash
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
slash
Commits
f1da9cb5
Unverified
Commit
f1da9cb5
authored
Jan 15, 2024
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fellow_logcache: alloc on demand from mempool
parent
858adc2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
fellow_log.c
src/fellow_log.c
+7
-3
No files found.
src/fellow_log.c
View file @
f1da9cb5
...
...
@@ -1157,7 +1157,7 @@ fellow_logcache_fini(struct fellow_logcache *flc)
VTAILQ_FOREACH(fle, &flc->free, list) {
CHECK_OBJ(fle, FELLOW_LOGCACHE_ENTRY_MAGIC);
AZ(fle->incore);
A
N
(
buddy_return_ptr_page
(
rets
,
&
fle
->
alloc
)
);
A
Z(fle->alloc.ptr
);
}
VTAILQ_FOREACH(fle, &flc->used, list) {
CHECK_OBJ(fle, FELLOW_LOGCACHE_ENTRY_MAGIC);
...
...
@@ -1231,8 +1231,6 @@ fellow_logcache_init(struct fellow_logcache *flc, struct fellow_fd *ffd,
u < flc->n;
u++, fle++) {
INIT_OBJ(fle, FELLOW_LOGCACHE_ENTRY_MAGIC);
fle
->
alloc
=
buddy_get_next_ptr_page
(
flc_mempool_get
(
flc
->
mempool
,
NULL
));
VTAILQ_INSERT_TAIL(&flc->free, fle, list);
}
...
...
@@ -1265,6 +1263,7 @@ fellow_logcache_return(struct fellow_logcache *flc,
fle->incore = 0;
fle->off = 0;
fle->error = NULL;
buddy_return1_ptr_page(flc->ffd->membuddy, &fle->alloc);
VTAILQ_REMOVE(&flc->used, fle, list);
VTAILQ_INSERT_HEAD(&flc->free, fle, list);
...
...
@@ -1322,6 +1321,11 @@ fellow_logcache_take(struct fellow_logcache *flc, int direction)
return (fellow_logcache_steal(flc, direction));
VTAILQ_REMOVE(&flc->free, fle, list);
AZ(fle->alloc.ptr);
fle->alloc = buddy_get_next_ptr_page(
flc_mempool_get(flc->mempool, NULL));
return (fle);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment