Remove the unused front push feature

Ever since the first release of vmod_pesi, we knew that this feature
was probably not useful: As explained in the THREADS section of the
vcc / man page, we can not push to VDPs, so the only case where this
could work was when there are no VDPs. The only case pESI itself does
not need any is non-esi, non-gzip uncacheable streaming. Also, the
only case where it made a significant difference from pushing from the
level 0 / front thread was when there are no threads available and the
front thread runs the current include.

Since then, we never encountered a situation where we would have
needed this feature.
parent 913c4653
extern int front_push;
#define PF_HAS_TASK 1U
/* vcl-controlled flags */
#define PF_CFG_SERIAL (1U<<1)
#define PF_CFG_THREAD (1U<<2)
/* undocumented for now */
#define PF_CFG_FRONT_PUSH (1U<<4)
#define PF_CFG_DEFAULT \
( PF_CFG_THREAD \
| (front_push ? PF_CFG_FRONT_PUSH : 0) \
)
#define PF_CFG_DEFAULT PF_CFG_THREAD
#define PF_MASK_CFG \
( PF_CFG_SERIAL \
| PF_CFG_THREAD \
| PF_CFG_FRONT_PUSH \
)
......@@ -60,12 +60,6 @@
#include "misc.h"
/*
* whether to push bytes early
*
*/
int front_push = 0;
/* Forward declarations */
static void vped_deliver(struct req *, struct boc *, int);
static void vped_reembark(struct worker *, struct req *);
......@@ -567,36 +561,6 @@ pesi_buf_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv,
node_insert(tree, parent, node);
/*
* check unlocked if an attempt to unpend makes any sense at all
*
* XXX front delivery implementation is incomplete, we would need to
* push the front in other places, too
*
* Yet, as explained in the documentation of the "thread" flag, front
* pushing really does not make much sense, the only case actually is
* non-esi non-gzip uncacheable streaming...
*/
AN(tree->front);
if (pesi->flags & PF_CFG_FRONT_PUSH &&
tree->unpend_owner != NULL &&
(tree->front->parent == NULL ||
tree->front == parent ||
tree->front->parent == parent ||
tree->front_owner == vdx->wrk)) {
VSLdbg(vdx, "front push");
// XXX for this node, we can spare buffering if got pushed
// XXX double locking with node_insert
Lck_Lock(&tree->tree_lock);
if (parent->state == ST_PRIVATE)
set_open(tree, parent, vdx->wrk);
assert(parent->state == ST_OPEN);
tree_deliver(vdx, tree);
Lck_Unlock(&tree->tree_lock);
}
VSLdbgv(vdx, "bytes_add to %s parent: exit",
parent->state == ST_PRIVATE ? "private" : "open");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment