From owner-freebsd-current@FreeBSD.ORG Mon Nov 6 02:58:03 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C73316A4A0 for ; Mon, 6 Nov 2006 02:58:03 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id 943D843D66 for ; Mon, 6 Nov 2006 02:58:01 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0506.google.com with SMTP id i27so838515wxd for ; Sun, 05 Nov 2006 18:58:01 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Nk6CMHY6oPRFVdZxgSc7mtoowzz6HiuAB6RfwI7bs0zarRwTMn0Vyq35eMIPQM05n+aRfMKoH6Ai/9ZhvDnu8tJqMM1sz7sCsHHASliYSuqgCtmffcpizECJBhS5VSsqy4Oer4Ua1EZx2Mn0sCXFfiKygAJ0aLgnK1/Sdy5J6ng= Received: by 10.70.19.16 with SMTP id 16mr4206777wxs.1162781870607; Sun, 05 Nov 2006 18:57:50 -0800 (PST) Received: by 10.70.12.2 with HTTP; Sun, 5 Nov 2006 18:57:50 -0800 (PST) Message-ID: <3bbf2fe10611051857m4c644ad2o7d71a86e46eaf9a8@mail.gmail.com> Date: Mon, 6 Nov 2006 03:57:50 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: freebsd-current@freebsd.org, freebsd-arch@freebsd.org, "John Baldwin" , kmacy@freebsd.org, pho@freebsd.org In-Reply-To: <3bbf2fe10610181518k68356528i154267c0bd1b1a77@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3bbf2fe10610181518k68356528i154267c0bd1b1a77@mail.gmail.com> X-Google-Sender-Auth: eb3e76b2c1b91d35 Cc: Subject: Re: sx locks rewriting - needs testers 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, 06 Nov 2006 02:58:03 -0000 2006/10/18, Attilio Rao : > In my P4 branch: //depot/user/attilio/attilio_smpng/... > you can find a sx locks rewriting using the optimized semantic of > rwlocks; in the end this might result in a valuable performance > improvement. After have received very positive stress-test feedbacks from pho@ (that I would like to thank for his patience and work) I went ahead and rather completed the implementation. Now this is ready to be reviewed and possibly committed into the CVS. Even if I plan a longer work on this branch (about syncronizing primitives), I think it is time for a revision of the work done until now from SMPng people (jhb, kmacy, etc.) and possibily an inclusion into HEAD (patch actually is 58k...). Some few hints about the patch: - LOCK_DEBUG adds a dependence between sx.h and lock.h (as for rwlocks and mutex) and a the new options SXLOCK_NOINLINE is added - XFS locking is still disabled in the patch (I hope to do it for tomorrow, I'm in GMT+1). - Possibly the sleepqueue interface modifies and new flags might be documented in the manpages (and NOTES file too, in order to reflect SXLOCK_NOINLINE inclusion). - It misses still of the adaptive spinning code, but it can be inserted after without problems. You can download the code directly from perforce (//depot/user/attilio/attilio_smpng/...) but patches are available here: http://users.gufi.org/~rookie/works/patches/smpng06112006.diff http://users.gufi.org/~rookie/works/patches/_sx.h I hope you will enjoy it (feedbacks, ideas, comments would be very appreciated). Attilio -- Peace can only be achieved by understanding - A. Einstein