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
9fdee0f7
Unverified
Commit
9fdee0f7
authored
Dec 21, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fellow_busy: Use dowry
parent
e4ad1336
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
fellow_cache.c
src/fellow_cache.c
+19
-8
No files found.
src/fellow_cache.c
View file @
9fdee0f7
...
...
@@ -2519,20 +2519,29 @@ fellow_busy_body_seg_alloc(struct fellow_busy *fbo,
memset
(
fbr
,
0
,
sizeof
*
fbr
);
reqs
=
&
fbo
->
bbrr
.
reqs
;
reg
=
buddy_off_extent_nil
;
reg
=
fbo
->
segdskdowry
;
fbo
->
segdskdowry
=
buddy_off_extent_nil
;
wait_dskalloc:
if
(
buddy_allo
c_wait
(
reqs
))
{
if
(
reg
.
off
<
0
&&
buddy_alloc_asyn
c_wait
(
reqs
))
{
reg
=
buddy_get_next_off_extent
(
reqs
);
buddy_alloc_wait_done
(
reqs
);
assert
(
reg
.
off
>=
0
);
}
if
(
reg
.
off
<
0
)
{
szc
=
fellow_busy_body_size_strategy
(
fbo
);
// must return a size, or sz_estimate is wrong
AN
(
szc
.
sz
);
buddy_alloc_wait_done
(
reqs
);
// must return a size, or sz_estimate is wrong
szc
=
fellow_busy_body_size_strategy
(
fbo
);
AN
(
szc
.
sz
);
// return and realloc if one power of two too big
if
(
reg
.
off
<
0
||
(
log2up
(
reg
.
size
)
>
MIN_FELLOW_BITS
&&
log2up
(
reg
.
size
)
>
log2up
(
szc
.
sz
)))
{
AN
(
buddy_req_extent
(
reqs
,
szc
.
sz
,
szc
.
cram
));
(
void
)
buddy_alloc_async
(
reqs
);
if
(
reg
.
off
>=
0
)
buddy_return1_off_extent
(
reqs
->
buddy
,
&
reg
);
goto
wait_dskalloc
;
}
...
...
@@ -2546,8 +2555,10 @@ fellow_busy_body_seg_alloc(struct fellow_busy *fbo,
// async allocation for remaining known size
szc
=
fellow_busy_body_size_strategy
(
fbo
);
if
(
szc
.
sz
)
if
(
szc
.
sz
)
{
AN
(
buddy_req_extent
(
reqs
,
szc
.
sz
,
szc
.
cram
));
(
void
)
buddy_alloc_async
(
reqs
);
}
}
assert
(
fbr
->
len
<
fdr
->
size
);
...
...
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