Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Sep 2017 16:45:55 +0000
From:      bugzilla-noreply@freebsd.org
To:        gecko@FreeBSD.org
Subject:   [Bug 222356] www/firefox: file-backed shared memory performance
Message-ID:  <bug-222356-21738-5STCvaoSW3@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-222356-21738@https.bugs.freebsd.org/bugzilla/>
References:  <bug-222356-21738@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222356

--- Comment #9 from Konstantin Belousov <kib@FreeBSD.org> ---
(In reply to Tijl Coosemans from comment #8)
I see, this happens during inactivation.  Please try this.

diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 2c144ab17c2..2e8324a7bf8 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -3055,7 +3055,8 @@ vinactive(struct vnode *vp, struct thread *td)
         * pending I/O and dirty pages in the object.
         */
        obj =3D vp->v_object;
-       if (obj !=3D NULL && (obj->flags & OBJ_MIGHTBEDIRTY) !=3D 0) {
+       if ((vp->v_vflag & VV_NOSYNC) =3D=3D 0 && obj !=3D NULL &&
+           (obj->flags & OBJ_MIGHTBEDIRTY) !=3D 0) {
                VM_OBJECT_WLOCK(obj);
                vm_object_page_clean(obj, 0, 0, 0);
                VM_OBJECT_WUNLOCK(obj);
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index fa197214296..33e7e6f8643 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -1083,8 +1068,8 @@ vm_object_sync(vm_object_t object, vm_ooffset_t offse=
t,
vm_size_t size,
         * I/O.
         */
        if (object->type =3D=3D OBJT_VNODE &&
-           (object->flags & OBJ_MIGHTBEDIRTY) !=3D 0) {
-               vp =3D object->handle;
+           (object->flags & OBJ_MIGHTBEDIRTY) !=3D 0 &&
+           ((vp =3D object->handle)->v_vflag & VV_NOSYNC) =3D=3D 0) {
                VM_OBJECT_WUNLOCK(object);
                (void) vn_start_write(vp, &mp, V_WAIT);
                vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-222356-21738-5STCvaoSW3>