[master] 57a3042 add some memory barriers in vsc
Nils Goroll
nils.goroll at uplex.de
Sun Jun 11 15:02:06 CEST 2017
commit 57a3042d7ffeeba18eebdb8d717b7bceee93c534
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Sun Jun 11 15:00:45 2017 +0200
add some memory barriers in vsc
not sure if they improve the situation, just checking
diff --git a/lib/libvarnishapi/vsc.c b/lib/libvarnishapi/vsc.c
index 0706a39..1efb4c4 100644
--- a/lib/libvarnishapi/vsc.c
+++ b/lib/libvarnishapi/vsc.c
@@ -45,6 +45,7 @@
#include "vjsn.h"
#include "vsb.h"
#include "vend.h"
+#include "vmb.h"
#include "vapi/vsc.h"
#include "vapi/vsm.h"
@@ -272,6 +273,7 @@ vsc_add_pt(struct vsc *vsc, const volatile void *ptr,
pt->point.desc = desc;
pt->point.ptr = ptr;
pt->point.section = &vf->section;
+ VWMB();
VTAILQ_INSERT_TAIL(&vsc->pt_list, pt, list);
}
@@ -476,6 +478,7 @@ VSC_Iter(struct vsm *vd, struct VSM_fantom *fantom, VSC_iter_f *func,
if (fantom != NULL)
*fantom = vsc->iter_fantom;
VTAILQ_FOREACH(pt, &vsc->pt_list, list) {
+ VRMB();
i = func(priv, &pt->point);
if (i)
return (i);
diff --git a/lib/libvarnishapi/vsm.c b/lib/libvarnishapi/vsm.c
index ad03d0c..7368c2d 100644
--- a/lib/libvarnishapi/vsm.c
+++ b/lib/libvarnishapi/vsm.c
@@ -50,6 +50,7 @@
#include "vsm_priv.h"
#include "vsc_priv.h"
#include "vtim.h"
+#include "vmb.h"
#include "vapi/vsm.h"
@@ -112,6 +113,7 @@ VSM_SetVSC(struct vsm *vd, struct vsc *vsc)
{
CHECK_OBJ_NOTNULL(vd, VSM_MAGIC);
+ VWMB();
vd->vsc = vsc;
}
@@ -120,6 +122,7 @@ VSM_GetVSC(const struct vsm *vd)
{
CHECK_OBJ_NOTNULL(vd, VSM_MAGIC);
+ VRMB();
return (vd->vsc);
}
More information about the varnish-commit
mailing list