Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvdp-pesi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
uplex-varnish
libvdp-pesi
Commits
7b68f637
Commit
7b68f637
authored
Aug 02, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
we missed to account no_thread from esi_level > 0
solve by moving the accumulation to the destructor
parent
0f099684
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
12 deletions
+16
-12
pesi.c
src/pesi.c
+12
-0
vdp_pesi.c
src/vdp_pesi.c
+0
-10
vdp_pesi.h
src/vdp_pesi.h
+0
-2
vmod_pesi.c
src/vmod_pesi.c
+4
-0
No files found.
src/pesi.c
View file @
7b68f637
...
...
@@ -40,10 +40,16 @@
#include "debug.h"
#include "VSC_pesi.h"
#include "pesi_tree.h"
#include "pesi_flags.h"
#include "pesi.h"
/* shared with vmod code */
struct
lock
stats_lock
;
struct
VSC_pesi
*
stats
;
/* ------------------------------------------------------------
* pesi tasks
*
...
...
@@ -115,6 +121,12 @@ pesi_destroy(struct pesi **pesip)
CHECK_OBJ_NOTNULL
(
pesi
->
pecx
,
PECX_MAGIC
);
TAKE_OBJ_NOTNULL
(
pesi_tree
,
&
pesi
->
pesi_tree
,
PESI_TREE_MAGIC
);
if
(
pesi
->
no_thread
!=
0
)
{
Lck_Lock
(
&
stats_lock
);
stats
->
no_thread
+=
pesi
->
no_thread
;
Lck_Unlock
(
&
stats_lock
);
}
Lck_Lock
(
&
pesi_tree
->
task_lock
);
VTAILQ_REMOVE
(
&
pesi_tree
->
task_head
,
pesi
,
list
);
...
...
src/vdp_pesi.c
View file @
7b68f637
...
...
@@ -52,8 +52,6 @@
#include "foreign/qdef.h"
#include "vqueue.h"
#include "VSC_pesi.h"
#include "debug.h"
#include "vdp_pesi.h"
#include "node.h"
...
...
@@ -83,8 +81,6 @@ static void vped_close_vdp(struct req *, int, const struct vdp *);
static
void
assert_vdp_next_not
(
struct
req
*
,
const
struct
vdp
*
);
/* shared with vmod code */
struct
lock
stats_lock
;
struct
VSC_pesi
*
stats
;
struct
VSC_lck
*
lck_bytes_tree
,
*
lck_pesi_tree
;
struct
mempool
*
mempool
=
NULL
;
...
...
@@ -758,12 +754,6 @@ vdp_pesi_fini(struct req *req, void **priv)
CHECK_OBJ_NOTNULL
(
bytes_tree
,
BYTES_TREE_MAGIC
);
assert
(
bytes_tree
==
pesi_tree
->
tree
);
if
(
pesi
->
no_thread
!=
0
)
{
Lck_Lock
(
&
stats_lock
);
stats
->
no_thread
+=
pesi
->
no_thread
;
Lck_Unlock
(
&
stats_lock
);
}
pesi_destroy
(
&
pesi
);
task_fini
(
pesi_tree
,
pesi
);
...
...
src/vdp_pesi.h
View file @
7b68f637
...
...
@@ -29,8 +29,6 @@
* interfaces shared between vdp_pesi.c and vmod_pesi.c
*/
extern
struct
lock
stats_lock
;
extern
struct
VSC_pesi
*
stats
;
extern
struct
VSC_lck
*
lck_bytes_tree
,
*
lck_pesi_tree
;
extern
const
struct
vdp
VDP_pesi
;
...
...
src/vmod_pesi.c
View file @
7b68f637
...
...
@@ -45,6 +45,10 @@
#define VFAIL(ctx, fmt, ...) \
VRT_fail((ctx), "vdp pesi failure: " fmt, __VA_ARGS__)
/* in pesi.c */
extern
struct
lock
stats_lock
;
extern
struct
VSC_pesi
*
stats
;
/* VMOD shared object globals */
static
unsigned
loadcnt
=
0
,
warmcnt
=
0
;
static
struct
vsc_seg
*
vsc_seg
=
NULL
,
*
pesi_vsc_seg
=
NULL
;
...
...
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