diff options
| author | John Marino <marino@FreeBSD.org> | 2015-04-30 19:34:46 +0000 | 
|---|---|---|
| committer | John Marino <marino@FreeBSD.org> | 2015-04-30 19:34:46 +0000 | 
| commit | 083f772cc866102df4b1b31fad8ddc6d73fa292b (patch) | |
| tree | 9f6d4de1c256db62374ff310080a5576103a1277 /www/squid/files/patch-src_DiskIO_Mmapped_MmappedFile.cc | |
| parent | Update to 0.9.15 (diff) | |
www/squid: Add MAP_NOSYNC flay to mmap call
This is the same technique used by PostgreSQL to prevent dirty pages
from flushing prematurely (performance hit).  In any case, it can't hurt
and it's been used in production for 18 months.  Timp87 provided the 3.5
version of squid; the port is still unmaintained.
PR:		198920
Submitted by:	emz (norma.perm.ru)
concurred:	timp87 (gmail)
Diffstat (limited to 'www/squid/files/patch-src_DiskIO_Mmapped_MmappedFile.cc')
| -rw-r--r-- | www/squid/files/patch-src_DiskIO_Mmapped_MmappedFile.cc | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/www/squid/files/patch-src_DiskIO_Mmapped_MmappedFile.cc b/www/squid/files/patch-src_DiskIO_Mmapped_MmappedFile.cc new file mode 100644 index 000000000000..0c0fb850ada5 --- /dev/null +++ b/www/squid/files/patch-src_DiskIO_Mmapped_MmappedFile.cc @@ -0,0 +1,11 @@ +--- src/DiskIO/Mmapped/MmappedFile.cc.orig	2015-04-15 10:39:56.146312000 +0300 ++++ src/DiskIO/Mmapped/MmappedFile.cc	2015-04-15 10:40:53.487834000 +0300 +@@ -235,7 +235,7 @@ +     static const int pageSize = getpagesize(); +     delta = offset % pageSize; +  +-    buf = mmap(NULL, length + delta, prot, flags, fd, offset - delta); ++    buf = mmap(NULL, length + delta, prot, flags | MAP_NOSYNC, fd, offset - delta); +  +     if (buf == MAP_FAILED) { +         const int errNo = errno; | 
