From owner-freebsd-current@FreeBSD.ORG Tue Jun 15 03:24:04 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 965C31065673; Tue, 15 Jun 2010 03:24:04 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 109808FC0C; Tue, 15 Jun 2010 03:24:03 +0000 (UTC) Received: by vws20 with SMTP id 20so6067780vws.13 for ; Mon, 14 Jun 2010 20:24:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=W4/D5dPpjf8zzG9cKhxlK40eRM0prz+NbOzJuShiAOQ=; b=Xw+fpD0o5r+jndqQaeORMKxgsKXUYNZjPb3mtPXzUQQIr2NhjsjnPKWBnZgkpW4Qvo nLVbdefB1OzUVOoTyvwt4kNn8mZLhPUNHCC6Y/vHUmv23E4wlEOyw2qGnR5geLHtV1f3 PdLw3LMOGT6D/l+iypourd4sB5JUON6l8mw84= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=oLcNqUrvA7M99j1KYfSYMJHmH7q6+Um1c+ErADlMuffgCyf7RXrOmT10v7aomf9naU 25UCBKoB6H01wKArLx2bINTW8a5Jb0ysUayB6tLO+Wkf5Fu/EeAEIz5IPcJuE+ZOjsGD D8SX7xRWtOJr7zc61T3pO4YOLe9MUfujp8D8o= MIME-Version: 1.0 Received: by 10.224.21.200 with SMTP id k8mr2811770qab.210.1276572242941; Mon, 14 Jun 2010 20:24:02 -0700 (PDT) Received: by 10.229.80.75 with HTTP; Mon, 14 Jun 2010 20:24:02 -0700 (PDT) In-Reply-To: <20100614213122.GS28855@wolf.nvidia.com> References: <4C15A09B.8080501@FreeBSD.org> <201006140848.55979.jhb@freebsd.org> <4C169F5B.7040409@gmail.com> <20100614213122.GS28855@wolf.nvidia.com> Date: Mon, 14 Jun 2010 20:24:02 -0700 Message-ID: From: Garrett Cooper To: Christian Zander Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Christian Zander , Doug Barton , Rene Ladan , "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 List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2010 03:24:04 -0000 On Mon, Jun 14, 2010 at 2:31 PM, Christian Zander wrot= e: > 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 ru= nning >> >>>> 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() a= long >> > 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 =3D E738 5471 D185 7013 0EE0 =A04FC8 3C1D 6F83 12E1 84F6 >> (subkeys.pgp.net) > > Content-Description: patch-jhb-current >> --- src/nvidia_subr.c.orig =A0 =A02010-03-12 17:48:52.000000000 +0100 >> +++ src/nvidia_subr.c 2010-06-14 23:25:28.000000000 +0200 >> @@ -1301,9 +1301,6 @@ >> >> =A0 =A0 =A0for (i =3D 0; i < count; i++) { >> =A0 =A0 =A0 =A0 =A0pte_array[i] =3D at->pte_array[i].physical_address; >> - =A0 =A0 =A0 =A0vm_page_lock_queues(); >> - =A0 =A0 =A0 =A0vm_page_wire(PHYS_TO_VM_PAGE(pte_array[i])); >> - =A0 =A0 =A0 =A0vm_page_unlock_queues(); >> =A0 =A0 =A0 =A0 =A0sglist_append_phys(at->sg_list, pte_array[i], PAGE_SI= ZE); >> =A0 =A0 =A0} >> >> @@ -1365,9 +1362,6 @@ >> =A0 =A0 =A0 =A0 =A0os_flush_cpu_cache(); >> >> =A0 =A0 =A0for (i =3D 0; i < count; i++) { >> - =A0 =A0 =A0 =A0vm_page_lock_queues(); >> - =A0 =A0 =A0 =A0vm_page_unwire(PHYS_TO_VM_PAGE(at->pte_array[i].physica= l_address), 0); >> - =A0 =A0 =A0 =A0vm_page_unlock_queues(); >> =A0 =A0 =A0 =A0 =A0kmem_free(kernel_map, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0at->pte_array[i].virtual_address, PAG= E_SIZE); >> =A0 =A0 =A0 =A0 =A0malloc_type_freed(M_NVIDIA, PAGE_SIZE); I'll give it a quick shot on my desktop to see how things go. FWIW, nvidia-driver-195.36.15 has been a rock solid release as well, with or without the patch. Cheers, -Garrett