From owner-freebsd-amd64@FreeBSD.ORG Wed Nov 24 05:13:05 2004 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 783D216A4CE for ; Wed, 24 Nov 2004 05:13:05 +0000 (GMT) Received: from mproxy.gmail.com (mproxy.gmail.com [216.239.56.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F1F243D46 for ; Wed, 24 Nov 2004 05:13:05 +0000 (GMT) (envelope-from astrodog@gmail.com) Received: by mproxy.gmail.com with SMTP id u33so39450cwc for ; Tue, 23 Nov 2004 21:13:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:return-path:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=G4xhKXbF8uw8yLX8p6zcjcSkkgAwnUm444guyXG15atbp3Pb1VN0AgkTvYoMuz/3zuVwj4DkgsxKy2wNFJN8AeeATWWcp72s13suaDLscCH8O/JFwx/glIIJfCjw3ht3BCJo+rBy6m9SyI5328PsXguOAdz008D86UxiYbTqhjo= Received: by 10.11.122.45 with SMTP id u45mr15453cwc; Tue, 23 Nov 2004 21:13:05 -0800 (PST) Received: from ?192.168.102.104? ([67.160.118.158]) by smtp.gmail.com with ESMTP id v71sm1572cwb; Tue, 23 Nov 2004 21:13:05 -0800 (PST) Message-ID: <41A3A7D9.7090009@gmail.com> Date: Tue, 23 Nov 2004 21:12:57 +0000 From: Astrodog User-Agent: Mozilla Thunderbird 0.9 (X11/20041122) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-amd64@freebsd.org References: <200411231500.55841.jhb@FreeBSD.org> <200411231631.00945.jhb@FreeBSD.org> <9C77F94E-3DC8-11D9-A2B1-000D93C47836@xcllnt.net> In-Reply-To: <9C77F94E-3DC8-11D9-A2B1-000D93C47836@xcllnt.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Patch to optimize "bare" critical sections X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 05:13:05 -0000 Marcel Moolenaar wrote: > > On Nov 23, 2004, at 1:31 PM, John Baldwin wrote: > >> On Tuesday 23 November 2004 03:00 pm, John Baldwin wrote: >> >>> Basically, I have a patch to divorce the interrupt disable/deferring to >>> only happen inside of spinlocks using a new spinlock_enter/exit() API >>> (where a spinlock_enter/exit includes a critical section as well) >>> but that >>> plain critical sections won't have to do such a thing. I've tested >>> it on >>> i386, alpha, and sparc64 already, and it has also been tested on >>> arm. I'm >>> unable to get a cross-built powerpc kernel to link (linker dies with a >>> signal 6), but the compile did finish. I have cross-compiled ia64 and >>> amd64 >>> successfully, but have not run tested due to ENOHARDWARE. So, I would >>> appreciate it if a few folks could try the patch out on ppc, ia64, and >>> amd64 to make sure it works ok. Thanks. >>> >>> http://www.FreeBSD.org/~jhb/spinlock.patch >> >> >> *cough* Ahem, http://www.FreeBSD.org/~jhb/patches/spinlock.patch >> >> Sorry about that. > > > The patch doesn't apply cleanly. Can you create a patch against HEAD > and not your lock branch? > > Rejects are: > > Hmm... The next patch looks like a unified diff to me... > The text leading up to this was: > -------------------------- > |--- //depot/projects/smpng/sys/kern/kern_mutex.c 2004/11/15 > 20:20:33 > |+++ //depot/user/jhb/lock/kern/kern_mutex.c 2004/11/17 16:42:34 > -------------------------- > Patching file sys/kern/kern_mutex.c using Plan A... > Hunk #1 failed at 602. > Hunk #2 failed at 630. > 2 out of 2 hunks failed--saving rejects to sys/kern/kern_mutex.c.rej > Hmm... The next patch looks like a unified diff to me... > The text leading up to this was: > -------------------------- > |--- //depot/projects/smpng/sys/sys/mutex.h 2004/08/18 16:47:14 > |+++ //depot/user/jhb/lock/sys/mutex.h 2004/11/04 23:48:43 > -------------------------- > Patching file sys/sys/mutex.h using Plan A... > Hunk #1 succeeded at 164 (offset -3 lines). > Hunk #2 failed at 176. > Hunk #3 succeeded at 194 (offset -11 lines). > Hunk #4 succeeded at 212 with fuzz 2 (offset -4 lines). > Hunk #5 failed at 220. > 2 out of 5 hunks failed--saving rejects to sys/sys/mutex.h.rej > Tonight, I'll work out merging it with 5.3-STABLE, I think this might help with a problem I'm having with some of our machines. I'll let you know what the effect is, and how I'll include a patch if I can get it done. --- Harrison Grundy