From owner-svn-src-head@FreeBSD.ORG Tue Jun 4 22:47:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2B6C588E; Tue, 4 Jun 2013 22:47:02 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1C8F81095; Tue, 4 Jun 2013 22:47:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r54Ml1YL009184; Tue, 4 Jun 2013 22:47:01 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r54Ml1i3009183; Tue, 4 Jun 2013 22:47:01 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201306042247.r54Ml1i3009183@svn.freebsd.org> From: Attilio Rao Date: Tue, 4 Jun 2013 22:47:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251397 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jun 2013 22:47:02 -0000 Author: attilio Date: Tue Jun 4 22:47:01 2013 New Revision: 251397 URL: http://svnweb.freebsd.org/changeset/base/251397 Log: In vm_object_split(), busy and consequently unbusy the pages only when swap_pager_copy() is invoked, otherwise there is no reason to do so. This will eliminate the necessity to busy pages most of the times. Sponsored by: EMC / Isilon storage division Reviewed by: alc Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Tue Jun 4 22:32:33 2013 (r251396) +++ head/sys/vm/vm_object.c Tue Jun 4 22:47:01 2013 (r251397) @@ -1390,7 +1390,8 @@ retry: vm_page_rename(m, new_object, idx); vm_page_unlock(m); /* page automatically made dirty by rename and cache handled */ - vm_page_busy(m); + if (orig_object->type == OBJT_SWAP) + vm_page_busy(m); } if (orig_object->type == OBJT_SWAP) { /* @@ -1398,6 +1399,8 @@ retry: * and new_object's locks are released and reacquired. */ swap_pager_copy(orig_object, new_object, offidxstart, 0); + TAILQ_FOREACH(m, &new_object->memq, listq) + vm_page_wakeup(m); /* * Transfer any cached pages from orig_object to new_object. @@ -1413,8 +1416,6 @@ retry: new_object); } VM_OBJECT_WUNLOCK(orig_object); - TAILQ_FOREACH(m, &new_object->memq, listq) - vm_page_wakeup(m); VM_OBJECT_WUNLOCK(new_object); entry->object.vm_object = new_object; entry->offset = 0LL;