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
c8aa2fc2
Unverified
Commit
c8aa2fc2
authored
Sep 28, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize eviction of subsequent segments of the same object
parent
4019cc1b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
fellow_cache.c
src/fellow_cache.c
+16
-3
No files found.
src/fellow_cache.c
View file @
c8aa2fc2
...
...
@@ -3134,6 +3134,7 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru)
oc
=
NULL
;
fco
=
NULL
;
AZ
(
pthread_mutex_lock
(
&
lru
->
lru_mtx
));
//lint -e{850} loop variable modified in body
VTAILQ_FOREACH_SAFE
(
fcs
,
&
lru
->
lru_head
,
lru_list
,
fcss
)
{
// no use trying the same object again and again
if
(
fcs
->
fco
==
fco
)
...
...
@@ -3146,10 +3147,22 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru)
continue
;
}
if
(
fcs
->
state
==
FCS_INCORE
)
{
do
{
fellow_cache_lru_seg_evict_locked
(
fcs
,
&
alloc
,
lru
);
AZ
(
pthread_mutex_unlock
(
&
fco
->
mtx
));
AN
(
buddy_return_ptr_extent
(
rets
,
&
alloc
));
if
(
rets
->
size
<
lru
->
fc
->
membuddy
->
deficit
&&
fcss
!=
NULL
&&
fcss
->
state
==
FCS_INCORE
&&
fcss
->
fco
==
fco
)
{
fcs
=
fcss
;
fcss
=
VTAILQ_NEXT
(
fcs
,
lru_list
);
continue
;
}
}
while
(
0
);
AZ
(
pthread_mutex_unlock
(
&
fco
->
mtx
));
fco
=
NULL
;
if
(
rets
->
size
<
lru
->
fc
->
membuddy
->
deficit
)
continue
;
...
...
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