Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
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
unique-xids
Commits
000f1991
Commit
000f1991
authored
Oct 21, 2011
by
Poul-Henning Kamp
Committed by
Tollef Fog Heen
Feb 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make EXP_NukeOne() make do with a struct worker arg instead of sess.
parent
f85a52c0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
10 deletions
+9
-10
cache.h
bin/varnishd/cache.h
+1
-1
cache_center.c
bin/varnishd/cache_center.c
+2
-2
cache_expire.c
bin/varnishd/cache_expire.c
+4
-4
cache_http.c
bin/varnishd/cache_http.c
+0
-1
stevedore.c
bin/varnishd/stevedore.c
+2
-2
No files found.
bin/varnishd/cache.h
View file @
000f1991
...
@@ -714,7 +714,7 @@ void EXP_Inject(struct objcore *oc, struct lru *lru, double when);
...
@@ -714,7 +714,7 @@ 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
);
int
EXP_Touch
(
struct
objcore
*
oc
);
int
EXP_Touch
(
struct
objcore
*
oc
);
int
EXP_NukeOne
(
const
struct
sess
*
sp
,
struct
lru
*
lru
);
int
EXP_NukeOne
(
struct
worker
*
w
,
struct
lru
*
lru
);
/* cache_fetch.c */
/* cache_fetch.c */
struct
storage
*
FetchStorage
(
const
struct
sess
*
sp
,
ssize_t
sz
);
struct
storage
*
FetchStorage
(
const
struct
sess
*
sp
,
ssize_t
sz
);
...
...
bin/varnishd/cache_center.c
View file @
000f1991
...
@@ -441,8 +441,8 @@ cnt_error(struct sess *sp)
...
@@ -441,8 +441,8 @@ cnt_error(struct sess *sp)
&
w
->
exp
,
(
uint16_t
)
params
->
http_max_hdr
);
&
w
->
exp
,
(
uint16_t
)
params
->
http_max_hdr
);
if
(
sp
->
obj
==
NULL
)
if
(
sp
->
obj
==
NULL
)
sp
->
obj
=
STV_NewObject
(
sp
,
TRANSIENT_STORAGE
,
sp
->
obj
=
STV_NewObject
(
sp
,
TRANSIENT_STORAGE
,
params
->
http_resp_size
,
&
w
->
exp
,
params
->
http_resp_size
,
&
w
->
exp
,
(
uint16_t
)
params
->
http_max_hdr
);
(
uint16_t
)
params
->
http_max_hdr
);
if
(
sp
->
obj
==
NULL
)
{
if
(
sp
->
obj
==
NULL
)
{
sp
->
doclose
=
"Out of objects"
;
sp
->
doclose
=
"Out of objects"
;
sp
->
director
=
NULL
;
sp
->
director
=
NULL
;
...
...
bin/varnishd/cache_expire.c
View file @
000f1991
...
@@ -417,7 +417,7 @@ exp_timer(struct sess *sp, void *priv)
...
@@ -417,7 +417,7 @@ exp_timer(struct sess *sp, void *priv)
*/
*/
int
int
EXP_NukeOne
(
const
struct
sess
*
sp
,
struct
lru
*
lru
)
EXP_NukeOne
(
struct
worker
*
w
,
struct
lru
*
lru
)
{
{
struct
objcore
*
oc
;
struct
objcore
*
oc
;
struct
object
*
o
;
struct
object
*
o
;
...
@@ -449,9 +449,9 @@ EXP_NukeOne(const struct sess *sp, struct lru *lru)
...
@@ -449,9 +449,9 @@ EXP_NukeOne(const struct sess *sp, struct lru *lru)
return
(
-
1
);
return
(
-
1
);
/* XXX: bad idea for -spersistent */
/* XXX: bad idea for -spersistent */
o
=
oc_getobj
(
sp
->
wrk
,
oc
);
o
=
oc_getobj
(
w
,
oc
);
WSL
(
sp
->
wrk
,
SLT_ExpKill
,
0
,
"%u LRU"
,
o
->
xid
);
WSL
(
w
,
SLT_ExpKill
,
0
,
"%u LRU"
,
o
->
xid
);
(
void
)
HSH_Deref
(
sp
->
wrk
,
NULL
,
&
o
);
(
void
)
HSH_Deref
(
w
,
NULL
,
&
o
);
return
(
1
);
return
(
1
);
}
}
...
...
bin/varnishd/cache_http.c
View file @
000f1991
...
@@ -1003,7 +1003,6 @@ http_PutResponse(struct worker *w, int fd, const struct http *to,
...
@@ -1003,7 +1003,6 @@ http_PutResponse(struct worker *w, int fd, const struct http *to,
if
(
to
->
hd
[
HTTP_HDR_RESPONSE
].
b
==
NULL
)
if
(
to
->
hd
[
HTTP_HDR_RESPONSE
].
b
==
NULL
)
http_SetH
(
to
,
HTTP_HDR_RESPONSE
,
"Lost Response"
);
http_SetH
(
to
,
HTTP_HDR_RESPONSE
,
"Lost Response"
);
Tcheck
(
to
->
hd
[
HTTP_HDR_RESPONSE
]);
Tcheck
(
to
->
hd
[
HTTP_HDR_RESPONSE
]);
}
}
void
void
...
...
bin/varnishd/stevedore.c
View file @
000f1991
...
@@ -183,7 +183,7 @@ stv_alloc(const struct sess *sp, size_t size)
...
@@ -183,7 +183,7 @@ stv_alloc(const struct sess *sp, size_t size)
}
}
/* no luck; try to free some space and keep trying */
/* no luck; try to free some space and keep trying */
if
(
EXP_NukeOne
(
sp
,
stv
->
lru
)
==
-
1
)
if
(
EXP_NukeOne
(
sp
->
wrk
,
stv
->
lru
)
==
-
1
)
break
;
break
;
/* Enough is enough: try another if we have one */
/* Enough is enough: try another if we have one */
...
@@ -335,7 +335,7 @@ STV_NewObject(struct sess *sp, const char *hint, unsigned wsl, struct exp *ep,
...
@@ -335,7 +335,7 @@ STV_NewObject(struct sess *sp, const char *hint, unsigned wsl, struct exp *ep,
if
(
o
==
NULL
)
{
if
(
o
==
NULL
)
{
/* no luck; try to free some space and keep trying */
/* no luck; try to free some space and keep trying */
for
(
i
=
0
;
o
==
NULL
&&
i
<
params
->
nuke_limit
;
i
++
)
{
for
(
i
=
0
;
o
==
NULL
&&
i
<
params
->
nuke_limit
;
i
++
)
{
if
(
EXP_NukeOne
(
sp
,
stv
->
lru
)
==
-
1
)
if
(
EXP_NukeOne
(
sp
->
wrk
,
stv
->
lru
)
==
-
1
)
break
;
break
;
o
=
stv
->
allocobj
(
stv
,
sp
,
ltot
,
&
soc
);
o
=
stv
->
allocobj
(
stv
,
sp
,
ltot
,
&
soc
);
}
}
...
...
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