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
c954e37b
Commit
c954e37b
authored
Aug 14, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate the 'T0' argument from SES_RxStuff() it only saves a
timestamp syscall in very rare circumstances.
parent
b6645ff2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
8 deletions
+7
-8
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_session.c
bin/varnishd/cache/cache_session.c
+4
-5
cache_http1_fsm.c
bin/varnishd/http1/cache_http1_fsm.c
+1
-1
cache_proxy_proto.c
bin/varnishd/proxy/cache_proxy_proto.c
+1
-1
No files found.
bin/varnishd/cache/cache.h
View file @
c954e37b
...
...
@@ -980,7 +980,7 @@ void SES_RxInit(struct http_conn *htc, struct ws *ws,
unsigned
maxbytes
,
unsigned
maxhdr
);
void
SES_RxReInit
(
struct
http_conn
*
htc
);
enum
htc_status_e
SES_Rx
(
struct
http_conn
*
htc
,
double
tmo
);
enum
htc_status_e
SES_RxStuff
(
struct
http_conn
*
,
htc_complete_f
*
,
double
t0
,
enum
htc_status_e
SES_RxStuff
(
struct
http_conn
*
,
htc_complete_f
*
,
double
*
t1
,
double
*
t2
,
double
ti
,
double
tn
);
#define SESS_ATTR(UP, low, typ, len) \
...
...
bin/varnishd/cache/cache_session.c
View file @
c954e37b
...
...
@@ -226,7 +226,7 @@ SES_Rx(struct http_conn *htc, double tmo)
*/
enum
htc_status_e
SES_RxStuff
(
struct
http_conn
*
htc
,
htc_complete_f
*
func
,
double
t0
,
SES_RxStuff
(
struct
http_conn
*
htc
,
htc_complete_f
*
func
,
double
*
t1
,
double
*
t2
,
double
ti
,
double
tn
)
{
double
tmo
;
...
...
@@ -236,7 +236,6 @@ SES_RxStuff(struct http_conn *htc, htc_complete_f *func, double t0,
CHECK_OBJ_NOTNULL
(
htc
,
HTTP_CONN_MAGIC
);
AZ
(
isnan
(
t0
));
AZ
(
isnan
(
tn
));
if
(
t1
!=
NULL
)
assert
(
isnan
(
*
t1
));
...
...
@@ -258,7 +257,7 @@ SES_RxStuff(struct http_conn *htc, htc_complete_f *func, double t0,
return
(
HTC_S_COMPLETE
);
}
if
(
tn
<
now
)
{
/* XXX: WS_ReleaseP(htc->ws, htc->rxbuf_b); ? */
WS_ReleaseP
(
htc
->
ws
,
htc
->
rxbuf_b
);
return
(
HTC_S_TIMEOUT
);
}
if
(
hs
==
HTC_S_MORE
)
{
...
...
@@ -269,9 +268,9 @@ SES_RxStuff(struct http_conn *htc, htc_complete_f *func, double t0,
}
else
if
(
hs
!=
HTC_S_EMPTY
)
WRONG
(
"htc_status_e"
);
tmo
=
tn
-
t0
;
tmo
=
tn
-
now
;
if
(
!
isnan
(
ti
)
&&
ti
<
tn
)
tmo
=
ti
-
t0
;
tmo
=
ti
-
now
;
i
=
(
htc
->
ws
->
r
-
htc
->
rxbuf_e
)
-
1
;
/* space for NUL */
if
(
i
<=
0
)
{
WS_ReleaseP
(
htc
->
ws
,
htc
->
rxbuf_b
);
...
...
bin/varnishd/http1/cache_http1_fsm.c
View file @
c954e37b
...
...
@@ -200,7 +200,7 @@ HTTP1_Session(struct worker *wrk, struct req *req)
AZ
(
req
->
vcl
);
AZ
(
req
->
esi_level
);
hs
=
SES_RxStuff
(
req
->
htc
,
HTTP1_Complete
,
sp
->
t_idle
,
hs
=
SES_RxStuff
(
req
->
htc
,
HTTP1_Complete
,
&
req
->
t_first
,
&
req
->
t_req
,
sp
->
t_idle
+
cache_param
->
timeout_linger
,
sp
->
t_idle
+
cache_param
->
timeout_idle
);
...
...
bin/varnishd/proxy/cache_proxy_proto.c
View file @
c954e37b
...
...
@@ -351,7 +351,7 @@ VPX_Proto_Sess(struct worker *wrk, void *priv)
assert
(
sizeof
vpx1_sig
==
5
);
assert
(
sizeof
vpx2_sig
==
12
);
hs
=
SES_RxStuff
(
req
->
htc
,
vpx_complete
,
sp
->
t_idle
,
hs
=
SES_RxStuff
(
req
->
htc
,
vpx_complete
,
NULL
,
NULL
,
NAN
,
sp
->
t_idle
+
cache_param
->
timeout_idle
);
if
(
hs
!=
HTC_S_COMPLETE
)
{
Req_Release
(
req
);
...
...
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