From owner-svn-src-all@FreeBSD.ORG Wed Dec 24 02:12:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49F1E106564A; Wed, 24 Dec 2008 02:12:10 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from publicd.ub.mng.net (publicd.ub.mng.net [202.179.0.88]) by mx1.freebsd.org (Postfix) with ESMTP id F1AEA8FC1F; Wed, 24 Dec 2008 02:12:09 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from [202.179.0.164] (helo=daemon.micom.mng.net) by publicd.ub.mng.net with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1LFJE5-000Mq8-BJ; Wed, 24 Dec 2008 10:11:57 +0800 Message-ID: <49519A76.6010104@micom.mng.net> Date: Wed, 24 Dec 2008 10:12:06 +0800 From: Ganbold User-Agent: Thunderbird 2.0.0.12 (X11/20080415) MIME-Version: 1.0 To: Konstantin Belousov References: <200812231604.mBNG4X91006629@svn.freebsd.org> In-Reply-To: <200812231604.mBNG4X91006629@svn.freebsd.org> X-Enigmail-Version: 0.95.6 OpenPGP: id=78F6425E Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186433 - head/sys/dev/agp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 02:12:10 -0000 Konstantin Belousov wrote: > Author: kib > Date: Tue Dec 23 16:04:33 2008 > New Revision: 186433 > URL: http://svn.freebsd.org/changeset/base/186433 > > Log: > Clear busy state on the pages which are after the one that failed the bind > attempt. > > Reported and tested by: ganbold > Reviewed by: rnoland > MFC after: 2 weeks > > Modified: > head/sys/dev/agp/agp.c > > Modified: head/sys/dev/agp/agp.c > ============================================================================== > --- head/sys/dev/agp/agp.c Tue Dec 23 15:47:31 2008 (r186432) > +++ head/sys/dev/agp/agp.c Tue Dec 23 16:04:33 2008 (r186433) > @@ -564,6 +564,7 @@ agp_generic_bind_memory(device_t dev, st > device_printf(dev, "memory already bound\n"); > error = EINVAL; > VM_OBJECT_LOCK(mem->am_obj); > + i = 0; > goto bad; > } > > @@ -592,7 +593,6 @@ agp_generic_bind_memory(device_t dev, st > * Bail out. Reverse all the mappings > * and unwire the pages. > */ > - vm_page_wakeup(m); > for (k = 0; k < i + j; k += AGP_PAGE_SIZE) > AGP_UNBIND_PAGE(dev, offset + k); > goto bad; > @@ -622,8 +622,10 @@ agp_generic_bind_memory(device_t dev, st > bad: > mtx_unlock(&sc->as_lock); > VM_OBJECT_LOCK_ASSERT(mem->am_obj, MA_OWNED); > - for (i = 0; i < mem->am_size; i += PAGE_SIZE) { > - m = vm_page_lookup(mem->am_obj, OFF_TO_IDX(i)); > + for (k = 0; k < mem->am_size; k += PAGE_SIZE) { > + m = vm_page_lookup(mem->am_obj, OFF_TO_IDX(k)); > + if (k >= i) > + vm_page_wakeup(m); > vm_page_lock_queues(); > vm_page_unwire(m, 0); > vm_page_unlock_queues(); > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > > > Thanks a lot. Ganbold -- Some books are to be tasted, others to be swallowed, and some few to be chewed and digested. -- Francis Bacon [As anyone who has ever owned a puppy already knows. Ed.]