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

Mailing List Archive: Varnish: Dev

[PATCH 2/2] Add OpenBSD support

 

 

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


fgsch at lodoss

Aug 8, 2012, 6:45 PM

Post #1 of 2 (266 views)
Permalink
[PATCH 2/2] Add OpenBSD support

With this all tests but one succeed in OpenBSD.

As I've mentioned on irc, unless msync(2) is called a process reading from the underlying file might not see the same data as the process that mapped that file.
I think having the msync here is harmless and should not affect performance since it's only required at startup but I'm happy to live with an ifdef.

f.-

diff --git a/bin/varnishd/mgt/mgt_shmem.c b/bin/varnishd/mgt/mgt_shmem.c
index 79f8c41..ecce4c1 100644
--- a/bin/varnishd/mgt/mgt_shmem.c
+++ b/bin/varnishd/mgt/mgt_shmem.c
@@ -247,6 +247,9 @@ mgt_SHM_Create(void)
(void)unlink(fnbuf);
exit (-1);
}
+
+ /* Make sure changes are committed. */
+ (void)msync(p, size, MS_SYNC);
}

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

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


phk at phk

Aug 9, 2012, 1:06 AM

Post #2 of 2 (232 views)
Permalink
Re: [PATCH 2/2] Add OpenBSD support [In reply to]

In message <20120809024559.b61d3938ec0ef52aabd6c514 [at] lodoss>, "Federico G. S
chwindt" writes:
>With this all tests but one succeed in OpenBSD.
>
>As I've mentioned on irc, unless msync(2) is called a process
>reading from the underlying file might not see the same data as the
>process that mapped that file.

I'm a bit surprised about this one, does this mean that OpenBSD still
does not have a coherent buf/VM system ?

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk [at] FreeBSD | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

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

Varnish dev 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.