[Bug 222356] www/firefox: file-backed shared memory performance
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Sep 18 16:45:56 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222356
--- Comment #9 from Konstantin Belousov <kib at 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 = vp->v_object;
- if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0) {
+ if ((vp->v_vflag & VV_NOSYNC) == 0 && obj != NULL &&
+ (obj->flags & OBJ_MIGHTBEDIRTY) != 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 offset,
vm_size_t size,
* I/O.
*/
if (object->type == OBJT_VNODE &&
- (object->flags & OBJ_MIGHTBEDIRTY) != 0) {
- vp = object->handle;
+ (object->flags & OBJ_MIGHTBEDIRTY) != 0 &&
+ ((vp = object->handle)->v_vflag & VV_NOSYNC) == 0) {
VM_OBJECT_WUNLOCK(object);
(void) vn_start_write(vp, &mp, V_WAIT);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-gecko
mailing list