Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jun 2010 19:14:38 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        Rene Ladan <r.c.ladan@gmail.com>
Cc:        danfe@FreeBSD.org, Christian Zander <czander@nvidia.com>, alc@freebsd.org, Alan Cox <alan.l.cox@gmail.com>, freebsd-current@freebsd.org
Subject:   Re: nvidia-driver 195.22 use horribly broken on amd64 between	r206173 and
Message-ID:  <4C16E20E.9070309@FreeBSD.org>
In-Reply-To: <4C169F5B.7040409@gmail.com>
References:  <AANLkTil33IEVGXxsjV1oqfBgKQq-aIJ9Ur1U0Gn8Gplt@mail.gmail.com>	<AANLkTilinCqVDPajshyu9hkyGbj12rgh_prrrb-KNhAa@mail.gmail.com>	<4C15A09B.8080501@FreeBSD.org> <201006140848.55979.jhb@freebsd.org> <4C169F5B.7040409@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------030401070901060403000204
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 06/14/10 14:30, Rene Ladan wrote:
> On 14-06-2010 14:48, John Baldwin wrote:
>> On Sunday 13 June 2010 11:23:07 pm Doug Barton wrote:
>>> On 06/13/10 19:09, Alan Cox wrote:
>>>> On Sun, Jun 13, 2010 at 8:38 PM, Doug Barton<dougb@freebsd.org>   wrote:
>>>>
>>>>> On 06/01/10 08:26, John Baldwin 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?
>
> This is with a GeForce GT 240M, current/amd64 r209035, nvidia-driver
> 195.36.15
>
> I haven't runtime-tested it yet...

This worked great, thanks! I'm re-attaching the patch for Alexey's 
benefit, just in case.

Details, I'm running today's -current (r209174) and I've had it up for 
4.5 hours already, which is 3 hours longer than I was able to run with 
anything > 195.22 for months. I've done full "normal" use which includes 
lots of terminals, tbird, firefox, flash, etc.


Thanks again,

Doug

-- 

	... and that's just a little bit of history repeating.
			-- Propellerheads

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/


--------------030401070901060403000204
Content-Type: text/plain;
 name="patch-jhb-current"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="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);

--------------030401070901060403000204--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C16E20E.9070309>