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
3f5d6eb2
Commit
3f5d6eb2
authored
Aug 01, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only enter ST_OPEN subtrees which we own
parent
0c8110d1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
10 deletions
+33
-10
vdp_pesi.c
src/vdp_pesi.c
+33
-10
No files found.
src/vdp_pesi.c
View file @
3f5d6eb2
...
...
@@ -1349,12 +1349,24 @@ bytes_unpend_worklist(struct req *req, struct bytes_tree *tree,
return
;
}
/* XXX what if we are a different worker and within a tree ?*/
/*
* if unpending changes between threads, we need to make sure that we
* only descend into ST_OPEN T_NEXUS which we own, so re-start at the
* root
*
* this might seem inefficient, but we skip over any delivered subtrees,
* so we will not walk the whole tree each time
*/
AN
(
tree
->
front
);
if
(
tree
->
front_owner
==
req
->
wrk
)
node
=
tree
->
front
;
else
node
=
tree
->
root
;
/* when starting, we do not want to see any ST_UNPENDING nodes */
check
=
CHK_DELI
;
node
=
tree
->
front
;
while
(
node
!=
NULL
)
{
assert_node
(
node
,
CHK_ANY
);
...
...
@@ -1405,16 +1417,27 @@ bytes_unpend_worklist(struct req *req, struct bytes_tree *tree,
assert_node
(
node
,
CHK_PEND
);
/*
XXX only enter ST_OPEN
if we own it */
/*
for ST_OPEN, only descend
if we own it */
if
(
node
->
type
==
T_NEXUS
)
{
node
=
VSTAILQ_FIRST
(
&
node
->
nexus
.
children
);
continue
;
}
next
=
VSTAILQ_FIRST
(
&
node
->
nexus
.
children
);
if
(
node
->
state
==
ST_OPEN
)
{
VSLdbg
(
req
,
"bytes_unpend: init node no children"
);
switch
(
node
->
state
)
{
case
ST_CLOSED
:
// closed node with no children must not exist
AN
(
next
);
node
=
next
;
continue
;
case
ST_OPEN
:
set_front
(
tree
,
node
,
req
->
wrk
);
AN
(
node
->
nexus
.
owner
);
if
(
node
->
nexus
.
owner
==
req
->
wrk
)
{
node
=
next
;
continue
;
}
return
;
default:
INCOMPL
();
}
}
assert
(
node
->
state
==
ST_DATA
);
...
...
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