From owner-svn-ports-head@FreeBSD.ORG Thu Apr 30 19:34:48 2015 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6180DAC5; Thu, 30 Apr 2015 19:34:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 432A312C8; Thu, 30 Apr 2015 19:34:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UJYmCQ007992; Thu, 30 Apr 2015 19:34:48 GMT (envelope-from marino@FreeBSD.org) Received: (from marino@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UJYlEJ007989; Thu, 30 Apr 2015 19:34:47 GMT (envelope-from marino@FreeBSD.org) Message-Id: <201504301934.t3UJYlEJ007989@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marino set sender to marino@FreeBSD.org using -f From: John Marino Date: Thu, 30 Apr 2015 19:34:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r385055 - in head/www/squid: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 19:34:48 -0000 Author: marino Date: Thu Apr 30 19:34:46 2015 New Revision: 385055 URL: https://svnweb.freebsd.org/changeset/ports/385055 Log: 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) Added: head/www/squid/files/patch-src_DiskIO_Mmapped_MmappedFile.cc (contents, props changed) head/www/squid/files/patch-src_ipc_mem_Segment.cc (contents, props changed) Modified: head/www/squid/Makefile Modified: head/www/squid/Makefile ============================================================================== --- head/www/squid/Makefile Thu Apr 30 17:09:04 2015 (r385054) +++ head/www/squid/Makefile Thu Apr 30 19:34:46 2015 (r385055) @@ -2,6 +2,7 @@ PORTNAME= squid PORTVERSION= 3.5.3 +PORTREVISION= 1 CATEGORIES= www ipv6 MASTER_SITES= http://www.squid-cache.org/Versions/v3/${PORTVERSION:R}/ \ http://www2.us.squid-cache.org/Versions/v3/${PORTVERSION:R}/ \ Added: head/www/squid/files/patch-src_DiskIO_Mmapped_MmappedFile.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/squid/files/patch-src_DiskIO_Mmapped_MmappedFile.cc Thu Apr 30 19:34:46 2015 (r385055) @@ -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; Added: head/www/squid/files/patch-src_ipc_mem_Segment.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/squid/files/patch-src_ipc_mem_Segment.cc Thu Apr 30 19:34:46 2015 (r385055) @@ -0,0 +1,11 @@ +--- src/ipc/mem/Segment.cc.orig 2015-04-15 10:38:29.724278000 +0300 ++++ src/ipc/mem/Segment.cc 2015-04-15 10:39:37.130756000 +0300 +@@ -150,7 +150,7 @@ + assert(theSize == static_cast(static_cast(theSize))); + + void *const p = +- mmap(NULL, theSize, PROT_READ | PROT_WRITE, MAP_SHARED, theFD, 0); ++ mmap(NULL, theSize, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_NOSYNC, theFD, 0); + if (p == MAP_FAILED) { + debugs(54, 5, HERE << "mmap " << theName << ": " << xstrerror()); + fatalf("Ipc::Mem::Segment::attach failed to mmap(%s): %s\n",