Date: Wed, 4 Jan 2012 16:04:20 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r229495 - head/sys/vm Message-ID: <201201041604.q04G4KoP085517@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed Jan 4 16:04:20 2012 New Revision: 229495 URL: http://svn.freebsd.org/changeset/base/229495 Log: Do not restart the scan in vm_object_page_clean() on the object generation change if requested mode is async. The object generation is only changed when the object is marked as OBJ_MIGHTBEDIRTY. For async mode it is enough to write each dirty page, not to make a guarantee that all pages are cleared after the vm_object_page_clean() returned. Diagnosed by: truckman Tested by: flo Reviewed by: alc, truckman MFC after: 2 weeks Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Wed Jan 4 16:02:52 2012 (r229494) +++ head/sys/vm/vm_object.c Wed Jan 4 16:04:20 2012 (r229495) @@ -841,8 +841,12 @@ rescan: if (p->valid == 0) continue; if (vm_page_sleep_if_busy(p, TRUE, "vpcwai")) { - if (object->generation != curgeneration) - goto rescan; + if (object->generation != curgeneration) { + if ((flags & OBJPC_SYNC) != 0) + goto rescan; + else + clearobjflags = 0; + } np = vm_page_find_least(object, pi); continue; } @@ -851,8 +855,12 @@ rescan: n = vm_object_page_collect_flush(object, p, pagerflags, flags, &clearobjflags); - if (object->generation != curgeneration) - goto rescan; + if (object->generation != curgeneration) { + if ((flags & OBJPC_SYNC) != 0) + goto rescan; + else + clearobjflags = 0; + } /* * If the VOP_PUTPAGES() did a truncated write, so
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201041604.q04G4KoP085517>