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
c53ab05e
Commit
c53ab05e
authored
Feb 20, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of the workthread VSL buffer.
parent
89558df4
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
14 additions
and
41 deletions
+14
-41
cache.h
bin/varnishd/cache/cache.h
+0
-2
cache_center.c
bin/varnishd/cache/cache_center.c
+1
-2
cache_dir.c
bin/varnishd/cache/cache_dir.c
+5
-8
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+6
-7
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+0
-3
cache_session.c
bin/varnishd/cache/cache_session.c
+0
-1
cache_wrk.c
bin/varnishd/cache/cache_wrk.c
+2
-8
mgt_param.c
bin/varnishd/mgt/mgt_param.c
+0
-10
No files found.
bin/varnishd/cache/cache.h
View file @
c53ab05e
...
...
@@ -312,8 +312,6 @@ struct worker {
struct
VCL_conf
*
vcl
;
struct
vsl_log
vsl
[
1
];
struct
ws
aws
[
1
];
...
...
bin/varnishd/cache/cache_center.c
View file @
c53ab05e
...
...
@@ -402,7 +402,7 @@ cnt_done(struct sess *sp, struct worker *wrk, struct req *req)
req
->
xid
,
sp
->
t_req
,
sp
->
t_idle
,
dh
,
dp
,
da
);
}
req
->
xid
=
0
;
VSL_Flush
(
wrk
->
vsl
,
0
);
VSL_Flush
(
sp
->
req
->
vsl
,
0
);
sp
->
t_req
=
NAN
;
req
->
t_resp
=
NAN
;
...
...
@@ -1623,7 +1623,6 @@ CNT_Session(struct sess *sp)
WS_Assert
(
wrk
->
aws
);
CHECK_OBJ_ORNULL
(
wrk
->
nobjhead
,
OBJHEAD_MAGIC
);
}
VSL_Flush
(
wrk
->
vsl
,
0
);
#define ACCT(foo) AZ(wrk->acct_tmp.foo);
#include "tbl/acct_fields.h"
#undef ACCT
...
...
bin/varnishd/cache/cache_dir.c
View file @
c53ab05e
...
...
@@ -57,9 +57,10 @@ VDI_CloseFd(struct worker *wrk, struct vbc **vbp)
VSLb
(
vc
->
vsl
,
SLT_BackendClose
,
"%s"
,
bp
->
display_name
);
/* Checkpoint log to flush all info related to this connection
before the OS reuses the FD */
VSL_Flush
(
wrk
->
vsl
,
0
);
/*
* Checkpoint log to flush all info related to this connection
* before the OS reuses the FD
*/
VSL_Flush
(
vc
->
vsl
,
0
);
vc
->
vsl
->
wid
=
vc
->
orig_vsl_id
;
vc
->
vsl
=
NULL
;
...
...
@@ -91,11 +92,7 @@ VDI_RecycleFd(struct worker *wrk, struct vbc **vbp)
VSLb
(
vc
->
vsl
,
SLT_BackendReuse
,
"%s"
,
bp
->
display_name
);
/*
* Flush the shmlog, so that another session reusing this backend
* will log chronologically later than our use of it.
*/
VSL_Flush
(
wrk
->
vsl
,
0
);
/* XXX: revisit this hack */
VSL_Flush
(
vc
->
vsl
,
0
);
vc
->
vsl
->
wid
=
vc
->
orig_vsl_id
;
vc
->
vsl
=
NULL
;
...
...
bin/varnishd/cache/cache_esi_deliver.c
View file @
c53ab05e
...
...
@@ -45,18 +45,18 @@ static void
ved_include
(
struct
sess
*
sp
,
const
char
*
src
,
const
char
*
host
)
{
struct
object
*
obj
;
struct
worker
*
w
;
struct
worker
*
w
rk
;
char
*
sp_ws_wm
;
char
*
wrk_ws_wm
;
unsigned
sxid
,
res_mode
;
w
=
sp
->
wrk
;
w
rk
=
sp
->
wrk
;
if
(
sp
->
req
->
esi_level
>=
cache_param
->
max_esi_depth
)
return
;
sp
->
req
->
esi_level
++
;
(
void
)
WRW_FlushRelease
(
w
);
(
void
)
WRW_FlushRelease
(
w
rk
);
obj
=
sp
->
req
->
obj
;
sp
->
req
->
obj
=
NULL
;
...
...
@@ -67,7 +67,7 @@ ved_include(struct sess *sp, const char *src, const char *host)
/* Take a workspace snapshot */
sp_ws_wm
=
WS_Snapshot
(
sp
->
req
->
ws
);
wrk_ws_wm
=
WS_Snapshot
(
w
->
aws
);
/* XXX ? */
wrk_ws_wm
=
WS_Snapshot
(
w
rk
->
aws
);
/* XXX ? */
http_SetH
(
sp
->
req
->
http
,
HTTP_HDR_URL
,
src
);
if
(
host
!=
NULL
&&
*
host
!=
'\0'
)
{
...
...
@@ -93,12 +93,11 @@ ved_include(struct sess *sp, const char *src, const char *host)
sxid
=
sp
->
req
->
xid
;
while
(
1
)
{
sp
->
wrk
=
w
;
sp
->
wrk
=
w
rk
;
CNT_Session
(
sp
);
if
(
sp
->
step
==
STP_DONE
)
break
;
AZ
(
sp
->
wrk
);
VSL_Flush
(
w
->
vsl
,
0
);
DSL
(
0x20
,
SLT_Debug
,
sp
->
vsl_id
,
"loop waiting for ESI"
);
(
void
)
usleep
(
10000
);
}
...
...
@@ -111,7 +110,7 @@ ved_include(struct sess *sp, const char *src, const char *host)
/* Reset the workspace */
WS_Reset
(
sp
->
req
->
ws
,
sp_ws_wm
);
WS_Reset
(
w
->
aws
,
wrk_ws_wm
);
/* XXX ? */
WS_Reset
(
w
rk
->
aws
,
wrk_ws_wm
);
/* XXX ? */
WRW_Reserve
(
sp
->
wrk
,
&
sp
->
fd
,
sp
->
req
->
vsl
,
sp
->
req
->
t_resp
);
if
(
sp
->
req
->
res_mode
&
RES_CHUNKED
)
...
...
bin/varnishd/cache/cache_fetch.c
View file @
c53ab05e
...
...
@@ -442,9 +442,6 @@ FetchHdr(struct sess *sp, int need_host_hdr, int sendbody)
return
(
retry
);
}
/* Checkpoint the vsl.here */
VSL_Flush
(
wrk
->
vsl
,
0
);
/* XXX is this the right place? */
VSC_C_main
->
backend_req
++
;
...
...
bin/varnishd/cache/cache_session.c
View file @
c53ab05e
...
...
@@ -133,7 +133,6 @@ ses_pool_task(struct worker *wrk, void *arg)
THR_SetSession
(
NULL
);
WS_Assert
(
wrk
->
aws
);
AZ
(
wrk
->
wrw
);
assert
(
wrk
->
vsl
->
wlp
==
wrk
->
vsl
->
wlb
);
if
(
cache_param
->
diag_bitmap
&
0x00040000
)
{
if
(
wrk
->
vcl
!=
NULL
)
VCL_Rel
(
&
wrk
->
vcl
);
...
...
bin/varnishd/cache/cache_wrk.c
View file @
c53ab05e
...
...
@@ -94,13 +94,11 @@ wrk_bgthread(void *arg)
{
struct
bgthread
*
bt
;
struct
worker
wrk
;
uint32_t
logbuf
[
1024
];
/* XXX: size ? */
CAST_OBJ_NOTNULL
(
bt
,
arg
,
BGTHREAD_MAGIC
);
THR_SetName
(
bt
->
name
);
memset
(
&
wrk
,
0
,
sizeof
wrk
);
wrk
.
magic
=
WORKER_MAGIC
;
VSL_Setup
(
wrk
.
vsl
,
logbuf
,
sizeof
logbuf
);
(
void
)
bt
->
func
(
&
wrk
,
bt
->
priv
);
...
...
@@ -126,10 +124,9 @@ WRK_BgThread(pthread_t *thr, const char *name, bgthread_t *func, void *priv)
/*--------------------------------------------------------------------*/
static
void
*
wrk_thread_real
(
void
*
priv
,
unsigned
shm_workspace
,
unsigned
thread_workspace
)
wrk_thread_real
(
void
*
priv
,
unsigned
thread_workspace
)
{
struct
worker
*
w
,
ww
;
uint32_t
wlog
[
shm_workspace
/
4
];
unsigned
char
ws
[
thread_workspace
];
THR_SetName
(
"cache-worker"
);
...
...
@@ -137,7 +134,6 @@ wrk_thread_real(void *priv, unsigned shm_workspace, unsigned thread_workspace)
memset
(
w
,
0
,
sizeof
*
w
);
w
->
magic
=
WORKER_MAGIC
;
w
->
lastused
=
NAN
;
VSL_Setup
(
w
->
vsl
,
wlog
,
sizeof
wlog
);
AZ
(
pthread_cond_init
(
&
w
->
cond
,
NULL
));
WS_Init
(
w
->
aws
,
"wrk"
,
ws
,
thread_workspace
);
...
...
@@ -162,9 +158,7 @@ void *
WRK_thread
(
void
*
priv
)
{
return
(
wrk_thread_real
(
priv
,
cache_param
->
shm_workspace
,
cache_param
->
workspace_thread
));
return
(
wrk_thread_real
(
priv
,
cache_param
->
workspace_thread
));
}
void
...
...
bin/varnishd/mgt/mgt_param.c
View file @
c53ab05e
...
...
@@ -778,16 +778,6 @@ static const struct parspec input_parspec[] = {
"Minimum is 1k bytes."
,
0
,
"4k"
,
"bytes"
},
{
"shm_workspace"
,
tweak_bytes_u
,
&
mgt_param
.
shm_workspace
,
4096
,
UINT_MAX
,
"Bytes of shmlog workspace allocated for worker threads. "
"If too big, it wastes some ram, if too small it causes "
"needless flushes of the SHM workspace.
\n
"
"These flushes show up in stats as "
"
\"
SHM flushes due to overflow
\"
.
\n
"
"Minimum is 4096 bytes."
,
DELAYED_EFFECT
,
"8k"
,
"bytes"
},
{
"shm_reclen"
,
tweak_bytes_u
,
&
mgt_param
.
shm_reclen
,
16
,
65535
,
"Maximum number of bytes in SHM log record.
\n
"
...
...
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