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
ede98cd5
Unverified
Commit
ede98cd5
authored
Jul 10, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor region reserve
parent
2e63c01f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
fellow_cache.c
src/fellow_cache.c
+4
-2
No files found.
src/fellow_cache.c
View file @
ede98cd5
...
...
@@ -601,6 +601,8 @@ struct fellow_busy {
struct
fellow_body_region
body_region
;
#define FCO_MAX_REGIONS ((FELLOW_DISK_LOG_BLOCK_ENTRIES - 1) * DLE_REG_NREGION)
// for fdsl and busy region last chance
#define FCO_REGIONS_RESERVE 3
struct
buddy_off_extent
region
[
FCO_MAX_REGIONS
];
unsigned
nregion
;
uint8_t
grown
;
...
...
@@ -1861,8 +1863,8 @@ fellow_busy_region_alloc(struct fellow_busy *fbo, size_t size, int8_t cram)
fc
=
fbo
->
fc
;
CHECK_OBJ_NOTNULL
(
fc
,
FELLOW_CACHE_MAGIC
);
/* stop cramming if we
used half the regions already
*/
if
(
fbo
->
nregion
<
FCO_MAX_REGIONS
/
2
)
/* stop cramming if we
run out of regions
*/
if
(
fbo
->
nregion
<
FCO_MAX_REGIONS
-
FCO_REGIONS_RESERVE
)
cram
=
0
;
assert
(
fbo
->
nregion
<
FCO_MAX_REGIONS
);
...
...
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