From owner-freebsd-current@FreeBSD.ORG Wed May 26 21:55:09 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 C98B1106564A; Wed, 26 May 2010 21:55:09 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31]) by mx1.freebsd.org (Postfix) with ESMTP id 9CE838FC19; Wed, 26 May 2010 21:55:09 +0000 (UTC) Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id 449D32C2CB6; Wed, 26 May 2010 16:55:09 -0500 (CDT) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id NHgp+Smg0BR0; Wed, 26 May 2010 16:55:01 -0500 (CDT) Received: from [10.209.194.87] (unknown [10.209.194.87]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id 692DC2C2C59; Wed, 26 May 2010 16:55:01 -0500 (CDT) Message-ID: <4BFD98AF.9030503@cs.rice.edu> Date: Wed, 26 May 2010 16:54:55 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: Ryan Stone References: <4BFD4AE6.5040105@cs.rice.edu> <20100526165141.GF83316@deviant.kiev.zoral.com.ua> <4BFD5D5F.8090106@cs.rice.edu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Kostik Belousov , Garrett Cooper , FreeBSD Current , alc@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: Wed, 26 May 2010 21:55:09 -0000 On 5/26/2010 2:56 PM, Ryan Stone wrote: >> I'm by no means an expert in this area, but isn't removing the locking >> on free a bad thing? >> > Looking at the code, it seems that vm_page_unwire() only requires the > page to be locked if it is managed. As it was acquired by > contigmalloc, the page should be unmanaged so that should be ok. > > I am confused as to why vm_page_unwire() does not require the page to > be locked if the page is unmanaged. What is synchronizing the > accesses to m->wire_count? > You can think of unmanaged pages as being private. Not necessarily private to a thread or processor, but private to some entity, such as a particular process's page table. So, no one else, such as the page daemon, is going to be concurrently accessing the wire count field of the page, and thus, no page or page queues locking is needed. Alan