Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Commits

[master] cd2ce96 Allocate the vbo and http's out of the backend workspace to avoid wasting partial pages with likely parameter values.

 

 

Varnish commits RSS feed   Index | Next | Previous | View Threaded


phk at varnish-cache

Feb 8, 2012, 11:48 PM

Post #1 of 1 (25 views)
Permalink
[master] cd2ce96 Allocate the vbo and http's out of the backend workspace to avoid wasting partial pages with likely parameter values.

commit cd2ce96c4d4d6300fb44d526cf2fc0cc9a39db43
Author: Poul-Henning Kamp <phk [at] FreeBSD>
Date: Thu Feb 9 07:48:04 2012 +0000

Allocate the vbo and http's out of the backend workspace to avoid
wasting partial pages with likely parameter values.

diff --git a/bin/varnishd/cache/cache_busyobj.c b/bin/varnishd/cache/cache_busyobj.c
index 65791e8..d6074a7 100644
--- a/bin/varnishd/cache/cache_busyobj.c
+++ b/bin/varnishd/cache/cache_busyobj.c
@@ -40,8 +40,6 @@

static struct mempool *vbopool;

-static volatile unsigned vbosize;
-
struct vbo {
unsigned magic;
#define VBO_MAGIC 0xde3d8223
@@ -51,27 +49,6 @@ struct vbo {
struct busyobj bo;
};

-static struct lock vbo_mtx;
-
-/*--------------------------------------------------------------------
- */
-
-static void
-vbo_size_calc(volatile unsigned *u)
-{
- uint16_t nhttp;
- ssize_t http_space;
-
- assert(cache_param->http_max_hdr < 65536);
- nhttp = (uint16_t)cache_param->http_max_hdr;
-
- http_space = HTTP_estimate(nhttp);
-
- *u = sizeof(struct vbo) +
- http_space * 2L +
- cache_param->workspace_backend;
-}
-
/*--------------------------------------------------------------------
*/

@@ -79,10 +56,9 @@ void
VBO_Init(void)
{

- vbopool = MPL_New("vbo", &cache_param->vbo_pool, &vbosize,
- vbo_size_calc);
+ vbopool = MPL_New("vbo", &cache_param->vbo_pool,
+ &cache_param->workspace_backend, NULL);
AN(vbopool);
- Lck_New(&vbo_mtx, lck_busyobj);
}

/*--------------------------------------------------------------------

_______________________________________________
varnish-commit mailing list
varnish-commit [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit

Varnish commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.