Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent3
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
varnishevent3
Commits
abf653cd
Commit
abf653cd
authored
Feb 09, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Argument polishing
parent
b6633c0b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
12 deletions
+9
-12
cache.h
bin/varnishd/cache.h
+1
-1
cache_center.c
bin/varnishd/cache_center.c
+3
-2
cache_expire.c
bin/varnishd/cache_expire.c
+5
-9
No files found.
bin/varnishd/cache.h
View file @
abf653cd
...
@@ -632,7 +632,7 @@ void EXP_Insert(struct object *o);
...
@@ -632,7 +632,7 @@ void EXP_Insert(struct object *o);
void
EXP_Inject
(
struct
objcore
*
oc
,
struct
lru
*
lru
,
double
when
);
void
EXP_Inject
(
struct
objcore
*
oc
,
struct
lru
*
lru
,
double
when
);
void
EXP_Init
(
void
);
void
EXP_Init
(
void
);
void
EXP_Rearm
(
const
struct
object
*
o
);
void
EXP_Rearm
(
const
struct
object
*
o
);
void
EXP_Touch
(
struct
object
*
o
,
double
tnow
);
int
EXP_Touch
(
struct
objcore
*
oc
);
int
EXP_NukeOne
(
const
struct
sess
*
sp
,
struct
lru
*
lru
);
int
EXP_NukeOne
(
const
struct
sess
*
sp
,
struct
lru
*
lru
);
/* cache_fetch.c */
/* cache_fetch.c */
...
...
bin/varnishd/cache_center.c
View file @
abf653cd
...
@@ -208,8 +208,9 @@ cnt_deliver(struct sess *sp)
...
@@ -208,8 +208,9 @@ cnt_deliver(struct sess *sp)
sp
->
t_resp
=
TIM_real
();
sp
->
t_resp
=
TIM_real
();
if
(
sp
->
obj
->
objcore
!=
NULL
)
{
if
(
sp
->
obj
->
objcore
!=
NULL
)
{
if
((
sp
->
t_resp
-
sp
->
obj
->
last_lru
)
>
params
->
lru_timeout
)
if
((
sp
->
t_resp
-
sp
->
obj
->
last_lru
)
>
params
->
lru_timeout
&&
EXP_Touch
(
sp
->
obj
,
sp
->
t_resp
);
EXP_Touch
(
sp
->
obj
->
objcore
))
sp
->
obj
->
last_lru
=
sp
->
t_resp
;
sp
->
obj
->
last_use
=
sp
->
t_resp
;
/* XXX: locking ? */
sp
->
obj
->
last_use
=
sp
->
t_resp
;
/* XXX: locking ? */
}
}
sp
->
wrk
->
resp
=
sp
->
wrk
->
http
[
2
];
sp
->
wrk
->
resp
=
sp
->
wrk
->
http
[
2
];
...
...
bin/varnishd/cache_expire.c
View file @
abf653cd
...
@@ -156,14 +156,11 @@ EXP_Insert(struct object *o)
...
@@ -156,14 +156,11 @@ EXP_Insert(struct object *o)
* This optimization obviously leaves the LRU list imperfectly sorted.
* This optimization obviously leaves the LRU list imperfectly sorted.
*/
*/
void
int
EXP_Touch
(
struct
obj
ect
*
o
,
double
tnow
)
EXP_Touch
(
struct
obj
core
*
oc
)
{
{
struct
objcore
*
oc
;
struct
lru
*
lru
;
struct
lru
*
lru
;
CHECK_OBJ_NOTNULL
(
o
,
OBJECT_MAGIC
);
oc
=
o
->
objcore
;
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
/*
/*
...
@@ -174,7 +171,7 @@ EXP_Touch(struct object *o, double tnow)
...
@@ -174,7 +171,7 @@ EXP_Touch(struct object *o, double tnow)
* the cleaner from doing its job.
* the cleaner from doing its job.
*/
*/
if
(
oc
->
flags
&
OC_F_LRUDONTMOVE
)
if
(
oc
->
flags
&
OC_F_LRUDONTMOVE
)
return
;
return
(
0
)
;
lru
=
oc_getlru
(
oc
);
lru
=
oc_getlru
(
oc
);
CHECK_OBJ_NOTNULL
(
lru
,
LRU_MAGIC
);
CHECK_OBJ_NOTNULL
(
lru
,
LRU_MAGIC
);
...
@@ -186,16 +183,15 @@ EXP_Touch(struct object *o, double tnow)
...
@@ -186,16 +183,15 @@ EXP_Touch(struct object *o, double tnow)
* reduce contention a fair bit
* reduce contention a fair bit
*/
*/
if
(
Lck_Trylock
(
&
lru
->
mtx
))
if
(
Lck_Trylock
(
&
lru
->
mtx
))
return
;
return
(
0
)
;
if
(
oc
->
timer_idx
!=
BINHEAP_NOIDX
)
{
if
(
oc
->
timer_idx
!=
BINHEAP_NOIDX
)
{
VTAILQ_REMOVE
(
&
lru
->
lru_head
,
oc
,
lru_list
);
VTAILQ_REMOVE
(
&
lru
->
lru_head
,
oc
,
lru_list
);
VTAILQ_INSERT_TAIL
(
&
lru
->
lru_head
,
oc
,
lru_list
);
VTAILQ_INSERT_TAIL
(
&
lru
->
lru_head
,
oc
,
lru_list
);
VSC_main
->
n_lru_moved
++
;
VSC_main
->
n_lru_moved
++
;
o
->
last_lru
=
tnow
;
}
}
Lck_Unlock
(
&
lru
->
mtx
);
Lck_Unlock
(
&
lru
->
mtx
);
return
(
1
);
}
}
/*--------------------------------------------------------------------
/*--------------------------------------------------------------------
...
...
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