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
c9461b06
Unverified
Commit
c9461b06
authored
Oct 25, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Raise dsk alloc priority of logbuffer flushes with frees
Hopefully, this also contributes to a solution for #28
parent
91538632
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
4 deletions
+30
-4
fellow_log.c
src/fellow_log.c
+17
-4
fellow_pri.h
src/fellow_pri.h
+1
-0
fellow_regionlist.h
src/fellow_regionlist.h
+12
-0
No files found.
src/fellow_log.c
View file @
c9461b06
...
...
@@ -2198,11 +2198,23 @@ log_blocks_alloc_from_reqs(struct buddy_reqs *reqs,
}
static
void
logbuffer_fill_dskreq
(
struct
buddy_reqs
*
reqs
)
{
logbuffer_fill_dskreq
(
const
struct
fellow_logbuffer
*
lbuf
,
struct
buddy_reqs
*
reqs
)
{
unsigned
i
;
uint8_t
pri
;
CHECK_OBJ_NOTNULL
(
lbuf
,
FELLOW_LOGBUFFER_MAGIC
);
CHECK_OBJ_NOTNULL
(
reqs
,
BUDDY_REQS_MAGIC
);
buddy_alloc_wait_done
(
reqs
);
if
(
lbuf
->
regions_to_free
&&
regionlist_used
(
lbuf
->
regions_to_free
))
pri
=
FEP_DSK_LOG_PRI
;
else
pri
=
FEP_DSK_LOG
;
BUDDY_REQS_PRI
(
reqs
,
pri
);
for
(
i
=
0
;
i
<
reqs
->
space
;
i
++
)
AN
(
buddy_req_page
(
reqs
,
MIN_FELLOW_BITS
,
0
));
(
void
)
buddy_alloc_async
(
reqs
);
...
...
@@ -2228,7 +2240,7 @@ logbuffer_get_dskreqs(struct fellow_logbuffer *lbuf)
(
void
)
buddy_alloc_async_wait
(
reqs
);
if
(
buddy_reqs_next_ready
(
reqs
))
return
(
reqs
);
// ret2
logbuffer_fill_dskreq
(
reqs
);
logbuffer_fill_dskreq
(
lbuf
,
reqs
);
lbuf
->
active_reqs
=
!
lbuf
->
active_reqs
;
}
...
...
@@ -2252,6 +2264,8 @@ logbuffer_alloc_some(struct fellow_logbuffer *lbuf,
AN
(
arr
);
AN
(
n
);
assert
(
logbuffer_can
(
lbuf
,
LBUF_CAN_FLUSH
));
if
(
lbuf
->
logreg
!=
NULL
)
i
=
logblocks_alloc_from_logregion
(
lbuf
->
logreg
,
arr
,
n
);
else
...
...
@@ -2299,8 +2313,7 @@ logbuffer_alloc_some(struct fellow_logbuffer *lbuf,
dskreqs
=
alloc
.
ptr
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
BUDDY_REQS_INIT
(
&
(
*
dskreqs
)[
i
],
lbuf
->
dskbuddy
);
BUDDY_REQS_PRI
(
&
(
*
dskreqs
)[
i
].
reqs
,
FEP_DSK_LOG
);
logbuffer_fill_dskreq
(
&
(
*
dskreqs
)[
i
].
reqs
);
logbuffer_fill_dskreq
(
lbuf
,
&
(
*
dskreqs
)[
i
].
reqs
);
}
lbuf
->
dskreqs
=
dskreqs
;
}
...
...
src/fellow_pri.h
View file @
c9461b06
...
...
@@ -37,3 +37,4 @@
#define FEP_ITER 4 // obj critical (oh lck)
#define FEP_MEM_FREE 4 // regionlist
#define FEP_DSK_LOG 4 // logbuffer_alloc_some
#define FEP_DSK_LOG_PRI 5 // logbuffer_alloc_... free
src/fellow_regionlist.h
View file @
c9461b06
...
...
@@ -182,6 +182,18 @@ regionlist_alloc(buddy_t *membuddy)
return
(
rl
);
}
static
unsigned
regionlist_used
(
const
struct
regionlist
*
rl
)
{
struct
regl
*
r
;
CHECK_OBJ_NOTNULL
(
rl
,
REGIONLIST_MAGIC
);
r
=
VSTAILQ_FIRST
(
&
rl
->
head
);
if
(
r
==
NULL
)
return
(
0
);
return
(
r
->
n
);
}
static
void
regionlist_append
(
struct
regionlist
*
to
,
struct
regionlist
**
fromp
)
{
...
...
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