Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jul 2004 19:44:49 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/vm swap_pager.c uma_core.c vm_object.c vm_object.h
Message-ID:  <200407221944.i6MJintQ012598@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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