From owner-freebsd-smp Sun Aug 22 21:45:59 1999 Delivered-To: freebsd-smp@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id 27C8A14D8C for ; Sun, 22 Aug 1999 21:45:57 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id VAA01758; Sun, 22 Aug 1999 21:45:03 -0700 (PDT) (envelope-from dillon) Date: Sun, 22 Aug 1999 21:45:03 -0700 (PDT) From: Matthew Dillon Message-Id: <199908230445.VAA01758@apollo.backplane.com> To: Alan Cox , Luoqi Chen , freebsd-smp@FreeBSD.ORG Subject: cripes, found it (was Re: Weird infinite lockup in splx()) Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Cripes. I think it's a tight loop between two or more high priority system processes. Here's what is going on: kmem_alloc_wait() locks a vm_map, tries to find space, and if it fails it unlocks the map and then tsleep's on the map. What happens when you have two processes doing this? You would think it would be ok. But it isn't. Because the very first field of the vm_map structure is a lock structure. The locking functions are using the *SAME* wait address as the kmem_alloc_wait and kmem_free_wakeup code! Since we can get the locks just fine, if you have more then one process in this section of code the N processes rotate between each other due to the vm_map_unlock() calls waking up the tsleep() in the other process's kmem_alloc_wait. !!!! Oops. Ok, but how to fix? I am going to try to simply switch the first two fields in the vm_map structure so the lock does not sleep on the same address as kmem_alloc_wait. I believe this will fix the problem. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message