From owner-freebsd-current@FreeBSD.ORG Mon Jun 14 21:31:32 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 234561065678; Mon, 14 Jun 2010 21:31:32 +0000 (UTC) (envelope-from chzander@nvidia.com) Received: from hqemgate04.nvidia.com (hqemgate04.nvidia.com [216.228.121.35]) by mx1.freebsd.org (Postfix) with ESMTP id F36808FC1B; Mon, 14 Jun 2010 21:31:31 +0000 (UTC) Received: from hqnvupgp04.nvidia.com (Not Verified[172.20.161.48]) by hqemgate04.nvidia.com id ; Mon, 14 Jun 2010 14:29:02 -0700 Received: from hqemfe03.nvidia.com ([172.17.108.22]) by hqnvupgp04.nvidia.com (PGP Universal service); Mon, 14 Jun 2010 14:31:31 -0700 X-PGP-Universal: processed; by hqnvupgp04.nvidia.com on Mon, 14 Jun 2010 14:31:31 -0700 Received: from nvidia.com ([172.17.108.22]) by hqemfe03.nvidia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 Jun 2010 14:31:30 -0700 Date: Mon, 14 Jun 2010 14:31:22 -0700 From: Christian Zander To: Rene Ladan Message-ID: <20100614213122.GS28855@wolf.nvidia.com> References: <4C15A09B.8080501@FreeBSD.org> <201006140848.55979.jhb@freebsd.org> <4C169F5B.7040409@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C169F5B.7040409@gmail.com> User-Agent: Mutt/1.4.2.3i X-NVConfidentiality: public X-OriginalArrivalTime: 14 Jun 2010 21:31:30.0898 (UTC) FILETIME=[F459AB20:01CB0C08] X-Mailman-Approved-At: Tue, 15 Jun 2010 02:35:15 +0000 Cc: Christian Zander , Doug Barton , "alc@freebsd.org" , Alan Cox , "freebsd-current@freebsd.org" Subject: Re: nvidia-driver 195.22 use horribly broken on amd64 between r206173 and X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Christian Zander List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2010 21:31:32 -0000 On Mon, Jun 14, 2010 at 02:30:03PM -0700, Rene Ladan wrote: (...) > >>>>> I've asked the driver author if the calls to vm_page_wire() and > >>>>> vm_page_unwire() can simply be removed but have not heard back yet. > >>>>> > >>>> > >>>> Is there any news on this? I have updated to the latest current so I'm > >>>> running the nv driver now, but I'd like to get the nvidia driver running > >>>> again. > >>>> > >>>> > >>> Yes, the unnecessary (and now problematic) wiring and unwiring calls will > > be > >>> removed in a future release of the driver. > >> > >> Excellent! Any ETA? Or are there patches against an existing version of > >> the driver? > > > > I would just remove the calls to vm_page_wire() and vm_page_unwire() along > > with the immediately adjacent calls to vm_page_{un,}lock_queues(). > > > Just to confirm, like the attached patch? > Yes. > This is with a GeForce GT 240M, current/amd64 r209035, nvidia-driver > 195.36.15 > > I haven't runtime-tested it yet... > > Rene > -- > http://www.rene-ladan.nl/ > > GPG fingerprint = E738 5471 D185 7013 0EE0 4FC8 3C1D 6F83 12E1 84F6 > (subkeys.pgp.net) Content-Description: patch-jhb-current > --- src/nvidia_subr.c.orig 2010-03-12 17:48:52.000000000 +0100 > +++ src/nvidia_subr.c 2010-06-14 23:25:28.000000000 +0200 > @@ -1301,9 +1301,6 @@ > > for (i = 0; i < count; i++) { > pte_array[i] = at->pte_array[i].physical_address; > - vm_page_lock_queues(); > - vm_page_wire(PHYS_TO_VM_PAGE(pte_array[i])); > - vm_page_unlock_queues(); > sglist_append_phys(at->sg_list, pte_array[i], PAGE_SIZE); > } > > @@ -1365,9 +1362,6 @@ > os_flush_cpu_cache(); > > for (i = 0; i < count; i++) { > - vm_page_lock_queues(); > - vm_page_unwire(PHYS_TO_VM_PAGE(at->pte_array[i].physical_address), 0); > - vm_page_unlock_queues(); > kmem_free(kernel_map, > at->pte_array[i].virtual_address, PAGE_SIZE); > malloc_type_freed(M_NVIDIA, PAGE_SIZE); -- christian zander ch?zander@nvidia.com