[3.0] 6b9fa15 We always allocate an object entirely inside one stevedore now.
Tollef Fog Heen
tfheen at varnish-cache.org
Wed Aug 17 11:28:39 CEST 2011
commit 6b9fa157dc5e3151753b066b3daf4926d846119c
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Aug 15 07:29:37 2011 +0000
We always allocate an object entirely inside one stevedore now.
diff --git a/bin/varnishd/stevedore.c b/bin/varnishd/stevedore.c
index 9a0b671..533874e 100644
--- a/bin/varnishd/stevedore.c
+++ b/bin/varnishd/stevedore.c
@@ -151,20 +151,15 @@ static struct storage *
stv_alloc(const struct sess *sp, size_t size)
{
struct storage *st;
- struct stevedore *stv = NULL;
+ struct stevedore *stv;
unsigned fail = 0;
/*
- * Always try the stevedore which allocated the object in order to
- * not needlessly split an object across multiple stevedores.
+ * Always use the stevedore which allocated the object in order to
+ * keep an object inside the same stevedore.
*/
- if (sp->obj != NULL) {
- CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
- stv = sp->obj->objstore->stevedore;
- } else {
- INCOMPL();
- stv = stv_transient;
- }
+ CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
+ stv = sp->obj->objstore->stevedore;
CHECK_OBJ_NOTNULL(stv, STEVEDORE_MAGIC);
if (size > (size_t)(params->fetch_maxchunksize) << 10)
More information about the varnish-commit
mailing list