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
2e63c01f
Unverified
Commit
2e63c01f
authored
Jul 09, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop some notes regarding required refactoring, add grown indicator
Ref #10
parent
cec5e02e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
+23
-3
fellow_cache.c
src/fellow_cache.c
+23
-3
No files found.
src/fellow_cache.c
View file @
2e63c01f
...
...
@@ -591,7 +591,6 @@ struct fellow_busy {
size_t
sz_returned
;
// we add more whenever we exceed estimate
size_t
sz_increment
;
// how much we already alloced on dsk
size_t
sz_dskalloc
;
...
...
@@ -604,7 +603,7 @@ struct fellow_busy {
#define FCO_MAX_REGIONS ((FELLOW_DISK_LOG_BLOCK_ENTRIES - 1) * DLE_REG_NREGION)
struct
buddy_off_extent
region
[
FCO_MAX_REGIONS
];
unsigned
nregion
;
uint8_t
grown
;
#define FBO_NIO 11
/* protected by fco mtx */
uint8_t
io_idx
;
...
...
@@ -3591,6 +3590,8 @@ fellow_busy_obj_getspace(struct fellow_busy *fbo, size_t *sz, uint8_t **ptr)
fbo
->
sz_estimate
+=
fbo
->
sz_increment
;
fbo
->
sz_increment
<<=
1
;
// XXX wip
fbo
->
grown
=
1
;
}
fcs
=
fbo
->
body_seg
;
...
...
@@ -3968,15 +3969,34 @@ fellow_busy_free(struct fellow_busy **fbop)
*
* the trouble with disk vs. mem segments
*
* the log assumes we got max
51 disk segment
s per obj
* the log assumes we got max
FCO_MAX_REGIONS = 220 region
s per obj
* our memory segments must not be larger than 1/16th - 1/8 of mem
*
* so: alloc one big chunk of disk, chop into smaller, individually
* checksummed segments
*
* XXX CHANGE:
* for chunked: next pow2 with every chunk, so we never get above ~50
* disk segments
*
* Ballpark
* - disk/mem = 10k
* min:
* - mem = 1GB -> max seg 128MB
* - dsk = 10TB -> max obj 1.28TB
* max:
* - max seg because I/O 1<<30 = 1 GB
* - dsk = 16EB -> max obj 1<<61 2EB
* - region sz -> 2EB / 220 = 9PB (16PB/8PB)
* - seg/obj -> 1<<31 = 2g
* - sizeof(fds) = 56
* - size of all segments in seglists: 112GB
*
* TODO:
* - region != segment
* - fbo.io independent of FCO_MAX_REGIONS
* - introduce max object size depending on dsk size
* - change region allocation such that max object will always fit
*/
// XXX rearrange seglists ?
...
...
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