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
f4e7e7ea
Unverified
Commit
f4e7e7ea
authored
Sep 30, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Hunt bug #25"
See next commit for fix This reverts commit
bf1e9e71
.
parent
2d468a6f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
32 deletions
+0
-32
fellow_cache.c
src/fellow_cache.c
+0
-32
No files found.
src/fellow_cache.c
View file @
f4e7e7ea
...
@@ -43,8 +43,6 @@
...
@@ -43,8 +43,6 @@
#include "foreign/vend.h"
#include "foreign/vend.h"
#define BUG25_CHECK(fcs) assert(VTAILQ_NEXT(fcs, lru_list) != fcs)
#ifdef TEST_DRIVER
#ifdef TEST_DRIVER
#define FCERR_INJECT
#define FCERR_INJECT
#endif
#endif
...
@@ -1141,20 +1139,9 @@ fellow_cache_lru_chgbatch_apply(struct fellow_lru_chgbatch *lcb)
...
@@ -1141,20 +1139,9 @@ fellow_cache_lru_chgbatch_apply(struct fellow_lru_chgbatch *lcb)
TAKE_OBJ_NOTNULL
(
fcs
,
&
lcb
->
fcs
[
lcb
->
n_rem
],
TAKE_OBJ_NOTNULL
(
fcs
,
&
lcb
->
fcs
[
lcb
->
n_rem
],
FELLOW_CACHE_SEG_MAGIC
);
FELLOW_CACHE_SEG_MAGIC
);
assert
(
fcs
->
fco
==
fco
);
assert
(
fcs
->
fco
==
fco
);
BUG25_CHECK
(
fcs
);
VTAILQ_REMOVE
(
&
lru
->
lru_head
,
fcs
,
lru_list
);
VTAILQ_REMOVE
(
&
lru
->
lru_head
,
fcs
,
lru_list
);
}
}
fcs
=
VTAILQ_FIRST
(
&
lcb
->
add
);
if
(
fcs
)
BUG25_CHECK
(
fcs
);
fcs
=
VTAILQ_FIRST
(
&
lru
->
lru_head
);
if
(
fcs
)
BUG25_CHECK
(
fcs
);
VTAILQ_CONCAT
(
&
lru
->
lru_head
,
&
lcb
->
add
,
lru_list
);
VTAILQ_CONCAT
(
&
lru
->
lru_head
,
&
lcb
->
add
,
lru_list
);
fcs
=
VTAILQ_FIRST
(
&
lru
->
lru_head
);
if
(
fcs
)
BUG25_CHECK
(
fcs
);
AZ
(
pthread_mutex_unlock
(
&
lru
->
lru_mtx
));
AZ
(
pthread_mutex_unlock
(
&
lru
->
lru_mtx
));
lcb
->
n_add
=
0
;
lcb
->
n_add
=
0
;
AZ
(
lcb
->
n_rem
);
AZ
(
lcb
->
n_rem
);
...
@@ -1217,17 +1204,13 @@ fellow_cache_lru_chg(struct fellow_lru_chgbatch *lcb,
...
@@ -1217,17 +1204,13 @@ fellow_cache_lru_chg(struct fellow_lru_chgbatch *lcb,
AZ
(
fcs
->
lcb_add
);
AZ
(
fcs
->
lcb_add
);
AZ
(
fcs
->
lcb_remove
);
AZ
(
fcs
->
lcb_remove
);
fcs
->
lcb_add
=
1
;
fcs
->
lcb_add
=
1
;
BUG25_CHECK
(
fcs
);
VTAILQ_INSERT_TAIL
(
&
lcb
->
add
,
fcs
,
lru_list
);
VTAILQ_INSERT_TAIL
(
&
lcb
->
add
,
fcs
,
lru_list
);
BUG25_CHECK
(
fcs
);
lcb
->
n_add
++
;
lcb
->
n_add
++
;
}
}
else
if
(
fcs
->
lcb_add
)
{
else
if
(
fcs
->
lcb_add
)
{
//DBG("%p -add", fcs);
//DBG("%p -add", fcs);
AZ
(
fcs
->
lcb_remove
);
AZ
(
fcs
->
lcb_remove
);
BUG25_CHECK
(
fcs
);
VTAILQ_REMOVE
(
&
lcb
->
add
,
fcs
,
lru_list
);
VTAILQ_REMOVE
(
&
lcb
->
add
,
fcs
,
lru_list
);
BUG25_CHECK
(
fcs
);
fcs
->
lcb_add
=
0
;
fcs
->
lcb_add
=
0
;
AN
(
lcb
->
n_add
);
AN
(
lcb
->
n_add
);
lcb
->
n_add
--
;
lcb
->
n_add
--
;
...
@@ -3074,9 +3057,7 @@ fellow_cache_lru_seg_evict_locked(
...
@@ -3074,9 +3057,7 @@ fellow_cache_lru_seg_evict_locked(
fcs
->
fcs_onlru
=
0
;
fcs
->
fcs_onlru
=
0
;
AN
(
lru
->
n
);
AN
(
lru
->
n
);
lru
->
n
--
;
lru
->
n
--
;
BUG25_CHECK
(
fcs
);
VTAILQ_REMOVE
(
&
lru
->
lru_head
,
fcs
,
lru_list
);
VTAILQ_REMOVE
(
&
lru
->
lru_head
,
fcs
,
lru_list
);
BUG25_CHECK
(
fcs
);
fellow_cache_seg_evict_locked
(
fcs
,
alloc
);
fellow_cache_seg_evict_locked
(
fcs
,
alloc
);
}
}
...
@@ -3188,9 +3169,6 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru)
...
@@ -3188,9 +3169,6 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru)
//lint -e{850} loop variable modified in body
//lint -e{850} loop variable modified in body
VTAILQ_FOREACH_SAFE
(
fcs
,
&
lru
->
lru_head
,
lru_list
,
fcss
)
{
VTAILQ_FOREACH_SAFE
(
fcs
,
&
lru
->
lru_head
,
lru_list
,
fcss
)
{
assert
(
fcs
!=
fcss
);
assert
(
fcs
!=
fcss
);
BUG25_CHECK
(
fcs
);
if
(
fcss
)
BUG25_CHECK
(
fcss
);
// no use trying the same object again and again
// no use trying the same object again and again
if
(
fcs
->
fco
==
fco
)
if
(
fcs
->
fco
==
fco
)
continue
;
continue
;
...
@@ -3204,9 +3182,6 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru)
...
@@ -3204,9 +3182,6 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru)
}
}
if
(
fcs
->
state
==
FCS_INCORE
)
{
if
(
fcs
->
state
==
FCS_INCORE
)
{
do
{
do
{
BUG25_CHECK
(
fcs
);
if
(
fcss
)
BUG25_CHECK
(
fcss
);
fellow_cache_lru_seg_evict_locked
(
fcs
,
fellow_cache_lru_seg_evict_locked
(
fcs
,
&
alloc
,
lru
);
&
alloc
,
lru
);
AN
(
buddy_return_ptr_extent
(
rets
,
&
alloc
));
AN
(
buddy_return_ptr_extent
(
rets
,
&
alloc
));
...
@@ -3237,8 +3212,6 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru)
...
@@ -3237,8 +3212,6 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru)
AN
(
lru
->
n
);
AN
(
lru
->
n
);
lru
->
n
--
;
lru
->
n
--
;
VTAILQ_REMOVE
(
&
lru
->
lru_head
,
fcs
,
lru_list
);
VTAILQ_REMOVE
(
&
lru
->
lru_head
,
fcs
,
lru_list
);
BUG25_CHECK
(
fcs
);
AZ
(
pthread_mutex_unlock
(
&
lru
->
lru_mtx
));
AZ
(
pthread_mutex_unlock
(
&
lru
->
lru_mtx
));
r
=
stvfe_mutate
(
wrk
,
lru
,
oc
);
r
=
stvfe_mutate
(
wrk
,
lru
,
oc
);
...
@@ -3261,9 +3234,7 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru)
...
@@ -3261,9 +3234,7 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru)
AN
(
fcs
->
fco_lru_mutate
);
AN
(
fcs
->
fco_lru_mutate
);
fcs
->
fco_lru_mutate
=
0
;
fcs
->
fco_lru_mutate
=
0
;
BUG25_CHECK
(
fcs
);
VTAILQ_INSERT_TAIL
(
&
lru
->
lru_head
,
fcs
,
lru_list
);
VTAILQ_INSERT_TAIL
(
&
lru
->
lru_head
,
fcs
,
lru_list
);
BUG25_CHECK
(
fcs
);
lru
->
n
++
;
lru
->
n
++
;
AZ
(
pthread_mutex_unlock
(
&
fco
->
mtx
));
AZ
(
pthread_mutex_unlock
(
&
fco
->
mtx
));
...
@@ -3486,11 +3457,8 @@ fellow_cache_obj_lru_touch(struct fellow_cache_obj *fco)
...
@@ -3486,11 +3457,8 @@ fellow_cache_obj_lru_touch(struct fellow_cache_obj *fco)
return
(
0
);
return
(
0
);
}
}
AZ
(
fcs
->
fco_lru_mutate
);
AZ
(
fcs
->
fco_lru_mutate
);
BUG25_CHECK
(
fcs
);
VTAILQ_REMOVE
(
&
lru
->
lru_head
,
fcs
,
lru_list
);
VTAILQ_REMOVE
(
&
lru
->
lru_head
,
fcs
,
lru_list
);
BUG25_CHECK
(
fcs
);
VTAILQ_INSERT_TAIL
(
&
lru
->
lru_head
,
fcs
,
lru_list
);
VTAILQ_INSERT_TAIL
(
&
lru
->
lru_head
,
fcs
,
lru_list
);
BUG25_CHECK
(
fcs
);
//lint -e{455} flexelint does not grok trylock
//lint -e{455} flexelint does not grok trylock
AZ
(
pthread_mutex_unlock
(
&
lru
->
lru_mtx
));
AZ
(
pthread_mutex_unlock
(
&
lru
->
lru_mtx
));
...
...
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