Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
60036a1e
Commit
60036a1e
authored
Feb 03, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't take OC's of their LRU just to mail them to EXP
parent
8697257d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
23 deletions
+9
-23
cache_expire.c
bin/varnishd/cache/cache_expire.c
+9
-23
No files found.
bin/varnishd/cache/cache_expire.c
View file @
60036a1e
...
...
@@ -141,7 +141,6 @@ exp_mail_it(struct objcore *oc, uint8_t cmds)
{
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
AN
(
isnan
(
oc
->
last_lru
));
Lck_Lock
(
&
exphdl
->
mtx
);
if
(
!
(
oc
->
exp_flags
&
OC_EF_POSTED
))
{
if
(
oc
->
flags
&
OC_F_DYING
)
...
...
@@ -239,7 +238,6 @@ EXP_Insert(struct worker *wrk, struct objcore *oc)
void
EXP_Rearm
(
struct
objcore
*
oc
,
double
now
,
double
ttl
,
double
grace
,
double
keep
)
{
struct
lru
*
lru
;
double
when
;
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
...
...
@@ -259,22 +257,7 @@ EXP_Rearm(struct objcore *oc, double now, double ttl, double grace, double keep)
VSL
(
SLT_ExpKill
,
0
,
"EXP_Rearm p=%p E=%.9f e=%.9f f=0x%x"
,
oc
,
oc
->
timer_when
,
when
,
oc
->
flags
);
if
(
when
>
oc
->
exp
.
t_origin
&&
when
>
oc
->
timer_when
)
return
;
lru
=
ObjGetLRU
(
oc
);
CHECK_OBJ_NOTNULL
(
lru
,
LRU_MAGIC
);
Lck_Lock
(
&
lru
->
mtx
);
if
(
isnan
(
oc
->
last_lru
))
{
oc
=
NULL
;
}
else
{
oc
->
last_lru
=
NAN
;
VTAILQ_REMOVE
(
&
lru
->
lru_head
,
oc
,
lru_list
);
}
Lck_Unlock
(
&
lru
->
mtx
);
if
(
oc
!=
NULL
)
if
(
when
<
oc
->
exp
.
t_origin
||
when
<
oc
->
timer_when
)
exp_mail_it
(
oc
,
OC_EF_MOVE
);
}
...
...
@@ -336,11 +319,14 @@ exp_inbox(struct exp_priv *ep, struct objcore *oc, double now, unsigned flags)
CHECK_OBJ_NOTNULL
(
lru
,
LRU_MAGIC
);
Lck_Lock
(
&
lru
->
mtx
);
AN
(
isnan
(
oc
->
last_lru
));
oc
->
last_lru
=
now
;
if
(
!
(
oc
->
flags
&
OC_F_DYING
))
{
VTAILQ_INSERT_TAIL
(
&
lru
->
lru_head
,
oc
,
lru_list
);
oc
->
last_lru
=
now
;
if
(
isnan
(
oc
->
last_lru
))
{
if
(
!
(
oc
->
flags
&
OC_F_DYING
))
{
VTAILQ_INSERT_TAIL
(
&
lru
->
lru_head
,
oc
,
lru_list
);
oc
->
last_lru
=
now
;
}
}
else
if
(
oc
->
flags
&
OC_F_DYING
)
{
VTAILQ_REMOVE
(
&
lru
->
lru_head
,
oc
,
lru_list
);
oc
->
last_lru
=
NAN
;
}
Lck_Unlock
(
&
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