Date: Thu, 2 Jun 2016 02:39:40 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r301184 - stable/10/sys/vm Message-ID: <201606020239.u522deG4055953@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Thu Jun 2 02:39:40 2016 New Revision: 301184 URL: https://svnweb.freebsd.org/changeset/base/301184 Log: MFC r300758: Prevent parallel object collapses. Modified: stable/10/sys/vm/vm_object.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_object.c ============================================================================== --- stable/10/sys/vm/vm_object.c Thu Jun 2 02:36:06 2016 (r301183) +++ stable/10/sys/vm/vm_object.c Thu Jun 2 02:39:40 2016 (r301184) @@ -1721,6 +1721,9 @@ vm_object_collapse(vm_object_t object) * case. */ if (backing_object->ref_count == 1) { + vm_object_pip_add(object, 1); + vm_object_pip_add(backing_object, 1); + /* * If there is exactly one reference to the backing * object, we can collapse it into the parent. @@ -1792,11 +1795,13 @@ vm_object_collapse(vm_object_t object) KASSERT(backing_object->ref_count == 1, ( "backing_object %p was somehow re-referenced during collapse!", backing_object)); + vm_object_pip_wakeup(backing_object); backing_object->type = OBJT_DEAD; backing_object->ref_count = 0; VM_OBJECT_WUNLOCK(backing_object); vm_object_destroy(backing_object); + vm_object_pip_wakeup(object); object_collapses++; } else { /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606020239.u522deG4055953>