From owner-freebsd-current@FreeBSD.ORG Wed May 26 18:56:54 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 6181E106566B; Wed, 26 May 2010 18:56:54 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.221.181]) by mx1.freebsd.org (Postfix) with ESMTP id EE2FD8FC18; Wed, 26 May 2010 18:56:53 +0000 (UTC) Received: by qyk11 with SMTP id 11so10003081qyk.13 for ; Wed, 26 May 2010 11:56:53 -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=bagglSD+YaR3pD8h0/2OEZ58Hn6kS7jIDGZM0rKLp3I=; b=KuGbFFSvN/5CR9RsICouFA65t9Xg5gqlFZWGYDWh+tjM2RHIwdDV8f2Vn1yIAR0Gqd Q8BDBIG3EjSYsgAZpwu+tnY7znd8+ZIezjY1z6qfMIdEx5jRRs5S+RKnLmjNTP72Is+2 4xCHq+rMbx38JPpugXTKMNKADAtQHthHaV/UI= 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=Rx3a1MJHPdFg6o3Jtol3+sme0SyNDMVRGtvkViiFYUpUVLV/EkcOPoVoojfS32c5Fj wiikNWO6tWc2fzCLrcEyBH58I+JewcX9+aL9sKr+RwZZK/vYNoaVprKNZGLzghEtihts Rn+sU50KSfGQVvPH7dbHPP6NM/MXogz+g76vY= MIME-Version: 1.0 Received: by 10.224.35.89 with SMTP id o25mr5141486qad.209.1274900206714; Wed, 26 May 2010 11:56:46 -0700 (PDT) Received: by 10.229.190.83 with HTTP; Wed, 26 May 2010 11:56:46 -0700 (PDT) In-Reply-To: <4BFD5D5F.8090106@cs.rice.edu> References: <4BFD4AE6.5040105@cs.rice.edu> <20100526165141.GF83316@deviant.kiev.zoral.com.ua> <4BFD5D5F.8090106@cs.rice.edu> Date: Wed, 26 May 2010 11:56:46 -0700 Message-ID: From: Garrett Cooper To: Alan Cox Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Kostik Belousov , alc@freebsd.org, FreeBSD Current 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: Wed, 26 May 2010 18:56:54 -0000 On Wed, May 26, 2010 at 10:41 AM, Alan Cox wrote: > Kostik Belousov wrote: >> >> On Wed, May 26, 2010 at 11:23:02AM -0500, Alan Cox wrote: >> >>> >>> Garrett Cooper wrote: >>> >>>> >>>> =A0 Just reporting the fact that nvidia-driver 195.22 is horribly >>>> broken between r206173 and r208486 (my machine consistency livelocks >>>> at X11 startup); the latest driver is still broken as well with the >>>> same symptoms. I realize that's a huge revision difference, and I'll >>>> definitely try and track down the root cause via a binary search, but >>>> I wanted to make sure that other folks knew of the issue and don't >>>> upgrade and their systems break horribly as well. >>>> =A0 I suspect that the locking changes are causing the issue, but I >>>> don't have any hard data to backup my claim at this time. >>>> >>> >>> I'm sure they are. =A0The Nvidia driver directly accesses low-level vir= tual >>> memory structures on which the synchronization rules have changed. =A0(= In >>> contrast, the Xorg dri drivers in our source tree are using higher-leve= l >>> interfaces that have remained stable.) >>> >>> I don't think that a binary search is needed. =A0The lock assertion >>> failures should indicate most if not all of the changes that are needed= in >>> the driver. =A0When Kip got this process started, he bumped FreeBSD_ver= sion, >>> so it should be possible to condition the locking changes in the driver= . >>> >>> Good luck! >>> >> >> I did a quick glance over the driver, try this: >> http://people.freebsd.org/~kib/misc/nvidia-vm_page_lock.1.patch >> I did not even compiled the patched driver. >> > > The second snippet looks weird to me, specifically, seeing an explicit > unwiring before a kmem_free() call. =A0Should the corresponding allocatio= n be > using kmem_alloc_attr()? I'm by no means an expert in this area, but isn't removing the locking on free a bad thing? Thanks, -Garrett