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
f918ddbf
Commit
f918ddbf
authored
Dec 23, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the HTC from sess to req, that's another 64 bytes.
parent
3abbb127
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
17 deletions
+18
-17
cache.h
bin/varnishd/cache/cache.h
+3
-4
cache_center.c
bin/varnishd/cache/cache_center.c
+11
-9
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+1
-1
cache_http.c
bin/varnishd/cache/cache_http.c
+1
-1
cache_pipe.c
bin/varnishd/cache/cache_pipe.c
+2
-2
No files found.
bin/varnishd/cache/cache.h
View file @
f918ddbf
...
...
@@ -615,6 +615,9 @@ struct req {
char
*
ws_req
;
/* WS above request data */
double
t_resp
;
struct
http_conn
htc
[
1
];
};
/*--------------------------------------------------------------------*/
...
...
@@ -670,10 +673,6 @@ struct sess {
/* Timestamps, all on TIM_real() timescale */
double
t_req
;
/* TBD fields ------------------------------------------------*/
struct
http_conn
htc
[
1
];
};
/* Prototypes etc ----------------------------------------------------*/
...
...
bin/varnishd/cache/cache_center.c
View file @
f918ddbf
...
...
@@ -107,8 +107,12 @@ cnt_wait(struct sess *sp)
CHECK_OBJ_NOTNULL
(
sp
,
SESS_MAGIC
);
wrk
=
sp
->
wrk
;
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
if
(
sp
->
req
==
NULL
)
if
(
sp
->
req
==
NULL
)
{
SES_GetReq
(
sp
);
HTC_Init
(
sp
->
req
->
htc
,
sp
->
ws
,
sp
->
fd
,
sp
->
vsl_id
,
cache_param
->
http_req_size
,
cache_param
->
http_req_hdr_len
);
}
AZ
(
sp
->
req
->
vcl
);
AZ
(
wrk
->
obj
);
...
...
@@ -126,9 +130,9 @@ cnt_wait(struct sess *sp)
assert
(
j
>=
0
);
now
=
VTIM_real
();
if
(
j
!=
0
)
i
=
HTC_Rx
(
sp
->
htc
);
i
=
HTC_Rx
(
sp
->
req
->
htc
);
else
i
=
HTC_Complete
(
sp
->
htc
);
i
=
HTC_Complete
(
sp
->
req
->
htc
);
if
(
i
==
1
)
{
/* Got it, run with it */
sp
->
t_req
=
now
;
...
...
@@ -156,6 +160,8 @@ cnt_wait(struct sess *sp)
wrk
->
stats
.
sess_herd
++
;
SES_Charge
(
sp
);
SES_ReleaseReq
(
sp
);
WS_Release
(
sp
->
ws
,
0
);
WS_Reset
(
sp
->
ws
,
NULL
);
WAIT_Enter
(
sp
);
return
(
1
);
}
...
...
@@ -445,14 +451,14 @@ cnt_done(struct sess *sp)
WS_Reset
(
sp
->
ws
,
NULL
);
WS_Reset
(
wrk
->
ws
,
NULL
);
i
=
HTC_Reinit
(
sp
->
htc
);
i
=
HTC_Reinit
(
sp
->
req
->
htc
);
if
(
i
==
1
)
{
wrk
->
stats
.
sess_pipeline
++
;
sp
->
t_req
=
sp
->
t_idle
;
sp
->
step
=
STP_START
;
return
(
0
);
}
if
(
Tlen
(
sp
->
htc
->
rxbuf
))
if
(
Tlen
(
sp
->
req
->
htc
->
rxbuf
))
wrk
->
stats
.
sess_readahead
++
;
sp
->
step
=
STP_WAIT
;
sp
->
t_req
=
sp
->
t_idle
;
...
...
@@ -1052,10 +1058,6 @@ cnt_first(struct sess *sp)
sp
->
addr
,
sp
->
port
,
sp
->
mylsock
->
name
);
}
/* Receive a HTTP protocol request */
HTC_Init
(
sp
->
htc
,
sp
->
ws
,
sp
->
fd
,
sp
->
vsl_id
,
cache_param
->
http_req_size
,
cache_param
->
http_req_hdr_len
);
wrk
->
acct_tmp
.
sess
++
;
sp
->
step
=
STP_WAIT
;
...
...
bin/varnishd/cache/cache_fetch.c
View file @
f918ddbf
...
...
@@ -345,7 +345,7 @@ FetchReqBody(struct sess *sp)
rdcnt
=
sizeof
buf
;
else
rdcnt
=
content_length
;
rdcnt
=
HTC_Read
(
sp
->
wrk
,
sp
->
htc
,
buf
,
rdcnt
);
rdcnt
=
HTC_Read
(
sp
->
wrk
,
sp
->
req
->
htc
,
buf
,
rdcnt
);
if
(
rdcnt
<=
0
)
return
(
1
);
content_length
-=
rdcnt
;
...
...
bin/varnishd/cache/cache_http.c
View file @
f918ddbf
...
...
@@ -658,7 +658,7 @@ http_DissectRequest(struct sess *sp)
uint16_t
retval
;
CHECK_OBJ_NOTNULL
(
sp
,
SESS_MAGIC
);
htc
=
sp
->
htc
;
htc
=
sp
->
req
->
htc
;
CHECK_OBJ_NOTNULL
(
htc
,
HTTP_CONN_MAGIC
);
hp
=
sp
->
http
;
CHECK_OBJ_NOTNULL
(
hp
,
HTTP_MAGIC
);
...
...
bin/varnishd/cache/cache_pipe.c
View file @
f918ddbf
...
...
@@ -82,9 +82,9 @@ PipeSession(struct sess *sp)
sp
->
wrk
->
acct_tmp
.
hdrbytes
+=
http_Write
(
w
,
sp
->
vsl_id
,
sp
->
wrk
->
busyobj
->
bereq
,
0
);
if
(
sp
->
htc
->
pipeline
.
b
!=
NULL
)
if
(
sp
->
req
->
htc
->
pipeline
.
b
!=
NULL
)
sp
->
wrk
->
acct_tmp
.
bodybytes
+=
WRW_Write
(
w
,
sp
->
htc
->
pipeline
.
b
,
Tlen
(
sp
->
htc
->
pipeline
));
WRW_Write
(
w
,
sp
->
req
->
htc
->
pipeline
.
b
,
Tlen
(
sp
->
req
->
htc
->
pipeline
));
i
=
WRW_FlushRelease
(
w
);
...
...
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