From owner-svn-src-all@freebsd.org Fri Feb 3 01:16:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E516CCBEC1E; Fri, 3 Feb 2017 01:16:55 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B42557D2; Fri, 3 Feb 2017 01:16:55 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v131GsVC090135; Fri, 3 Feb 2017 01:16:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131Gswm090133; Fri, 3 Feb 2017 01:16:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030116.v131Gswm090133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313125 - in stable/11: lib/libc/sys sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:16:56 -0000 Author: markj Date: Fri Feb 3 01:16:54 2017 New Revision: 313125 URL: https://svnweb.freebsd.org/changeset/base/313125 Log: MFC r309200: Launder VPO_NOSYNC pages upon vnode deactivation. Modified: stable/11/lib/libc/sys/mmap.2 stable/11/sys/kern/vfs_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/mmap.2 ============================================================================== --- stable/11/lib/libc/sys/mmap.2 Fri Feb 3 01:15:31 2017 (r313124) +++ stable/11/lib/libc/sys/mmap.2 Fri Feb 3 01:16:54 2017 (r313125) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd February 18, 2015 +.Dd November 25, 2016 .Dt MMAP 2 .Os .Sh NAME @@ -189,6 +189,8 @@ this option any VM pages you dirty may b (every 30-60 seconds usually) which can create performance problems if you do not need that to occur (such as when you are using shared file-backed mmap regions for IPC purposes). +Dirty data will be flushed automatically when all mappings of an object are +removed and all descriptors referencing the object are closed. Note that VM/file system coherency is maintained whether you use .Dv MAP_NOSYNC Modified: stable/11/sys/kern/vfs_subr.c ============================================================================== --- stable/11/sys/kern/vfs_subr.c Fri Feb 3 01:15:31 2017 (r313124) +++ stable/11/sys/kern/vfs_subr.c Fri Feb 3 01:16:54 2017 (r313125) @@ -2948,7 +2948,7 @@ vinactive(struct vnode *vp, struct threa obj = vp->v_object; if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0) { VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_NOSYNC); + vm_object_page_clean(obj, 0, 0, 0); VM_OBJECT_WUNLOCK(obj); } VOP_INACTIVE(vp, td);