From owner-freebsd-current@FreeBSD.ORG Mon May 28 22:53:31 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0D8B16A507 for ; Mon, 28 May 2007 22:53:31 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.freebsd.org (Postfix) with ESMTP id 394F113C4AD for ; Mon, 28 May 2007 22:53:31 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by ug-out-1314.google.com with SMTP id u2so1003455uge for ; Mon, 28 May 2007 15:53:30 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=qMOHJS7vikMjFkLevedg84bSKhrVv+CLoxfqnj+8bGh5YeNI+xZdyV0piKlfXx3JURXuK9T78eibKpAqgW0wgiYlSXdzoxaljlIaXKu5d8KzLIjOV5MOH1zOcS0hij2Guy/KpEL58pqkQTBxaYbsrY6cRo2HklZ/mYAmyR0dkXI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=RIansRDVtFS0krFBpyzHiC3iwIDGaRsiPsn7JMUwrfxLmpH5Cjlgc1eMToTbPsbSZcVNPP/gPvPf/aFJ5YfIWjXf0vexUyteBEVmR5+n4zeqDEsRukwHgjVXfeybhqb+w5QYhvBL0hHIybd0LGL+4O7OGqZMlYiimW3qr2w18Y4= Received: by 10.78.123.5 with SMTP id v5mr1776469huc.1180392810047; Mon, 28 May 2007 15:53:30 -0700 (PDT) Received: by 10.78.97.18 with HTTP; Mon, 28 May 2007 15:53:30 -0700 (PDT) Message-ID: <3bbf2fe10705281553n49ed5408qde560f53931b7d71@mail.gmail.com> Date: Tue, 29 May 2007 00:53:30 +0200 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Tor Egge" In-Reply-To: <465B4450.90800@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1180138048.94117.17.camel@shumai.marcuscom.com> <465780A3.8040603@FreeBSD.org> <1180140483.94117.24.camel@shumai.marcuscom.com> <20070528.162023.41711345.Tor.Egge@cvsup.no.freebsd.org> <465B4450.90800@FreeBSD.org> X-Google-Sender-Auth: f2f314a1525b8902 Cc: jroberson@chesapeake.net, current@freebsd.org Subject: Re: Panic on -CURRENT after LDT changes 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: Mon, 28 May 2007 22:53:31 -0000 2007/5/28, Attilio Rao : > Tor Egge wrote: > > > > Finally, I found that i386_ldt_grow() called smp_rendezvous() without > > temporarily unlocking dt_lock. That caused a deadlock. Adding a temporary > > unlock of dt_lock seems to solve the problem for me. > > Effectively, there is the need to release the dt_lock before to call > smp_rendezvous() beacause other threads running on other CPUs will > contest on this lock and it will cause a deadlock (since their > curthreads don't hold the lock). > I think that mantaining the current locking requirements for > i386_ldt_grow() is still good, since, for how it is used, this is the > lighter approach. I will add release/unrelease around smp_rendezvous() too. Tor, I've updated the patch. Can you please redownload it and test/review: http://users.gufi.org/~rookie/works/patches/schedlock/ldt2.diff Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein