From owner-cvs-src@FreeBSD.ORG Thu Jul 22 19:44:49 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 549D416A4CE; Thu, 22 Jul 2004 19:44:49 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FD8B43D5C; Thu, 22 Jul 2004 19:44:49 +0000 (GMT) (envelope-from alc@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i6MJinJo012599; Thu, 22 Jul 2004 19:44:49 GMT (envelope-from alc@repoman.freebsd.org) Received: (from alc@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i6MJintQ012598; Thu, 22 Jul 2004 19:44:49 GMT (envelope-from alc) Message-Id: <200407221944.i6MJintQ012598@repoman.freebsd.org> From: Alan Cox Date: Thu, 22 Jul 2004 19:44:49 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/vm swap_pager.c uma_core.c vm_object.c vm_object.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2004 19:44:49 -0000 alc 2004-07-22 19:44:49 UTC FreeBSD src repository Modified files: sys/vm swap_pager.c uma_core.c vm_object.c vm_object.h Log: - Change uma_zone_set_obj() to call kmem_alloc_nofault() instead of kmem_alloc_pageable(). The difference between these is that an errant memory access to the zone will be detected sooner with kmem_alloc_nofault(). The following changes serve to eliminate the following lock-order reversal reported by witness: 1st 0xc1a3c084 vm object (vm object) @ vm/swap_pager.c:1311 2nd 0xc07acb00 swap_pager swhash (swap_pager swhash) @ vm/swap_pager.c:1797 3rd 0xc1804bdc vm object (vm object) @ vm/uma_core.c:931 There is no potential deadlock in this case. However, witness is unable to recognize this because vm objects used by UMA have the same type as ordinary vm objects. To remedy this, we make the following changes: - Add a mutex type argument to VM_OBJECT_LOCK_INIT(). - Use the mutex type argument to assign distinct types to special vm objects such as the kernel object, kmem object, and UMA objects. - Define a static swap zone object for use by UMA. (Only static objects are assigned a special mutex type.) Revision Changes Path 1.255 +2 -1 src/sys/vm/swap_pager.c 1.102 +2 -2 src/sys/vm/uma_core.c 1.326 +3 -8 src/sys/vm/vm_object.c 1.105 +3 -2 src/sys/vm/vm_object.h