From owner-svn-src-user@FreeBSD.ORG Tue Oct 30 02:25:55 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3A158B05; Tue, 30 Oct 2012 02:25:55 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id C4CA08FC12; Tue, 30 Oct 2012 02:25:53 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so5397938lag.13 for ; Mon, 29 Oct 2012 19:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=/HEgkPk+O8SIROMzs3LlXOzs4qmLyR2gtXN0DuAsPU4=; b=1FZEY80wQcPhYkep4a0OpRdwldxLaN5r2QIF4B4aR3ARP57jI4uHrLuCvl9GBjubHH 9da83OocKFqIoFQRmMg7n2b5cG0C6Ny6oh++xsxqx38jgeLuzvG5kP44VGbqPKyK76Fs n9F//wipBBjkQG6RuarOe1K2j1slN86/kI1+EwNCYcdkPTER372cETfcIUQ/iXGWvQ9C zLxL/tQIXrdDbdz1BjhvF55s1NK0PcNPcPkgvn/n9gZDa/XwZWuB/cY2zg3x8sTA7pev jz3dJoKVufYxz/8h1aEIrXFuwCwV3eECU3TG59TtB9mkhZJ19z7ZQ3FAlxafxSOHPcnX 5SwA== MIME-Version: 1.0 Received: by 10.152.132.3 with SMTP id oq3mr28574939lab.18.1351563952680; Mon, 29 Oct 2012 19:25:52 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Mon, 29 Oct 2012 19:25:52 -0700 (PDT) In-Reply-To: References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <201210241414.30723.jhb@freebsd.org> <508965B3.2020705@freebsd.org> <5089A913.2040603@freebsd.org> <508A89EF.5070805@freebsd.org> Date: Tue, 30 Oct 2012 02:25:52 +0000 X-Google-Sender-Auth: t5Sy2RMzIx4MkDxi7Y-_zqjTHrk Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: Attilio Rao To: Jeff Roberson Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, Andre Oppermann , John Baldwin , svn-src-user@freebsd.org, Bruce Evans X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 02:25:55 -0000 On Tue, Oct 30, 2012 at 1:38 AM, Attilio Rao wrote: > On Sun, Oct 28, 2012 at 5:42 PM, Attilio Rao wrote: [ trimm ] >> >> BTW, the mtx_sysuninit() introduction can be avoided by using this other trick: >> #define MTX_SYSINIT(name, mtx, desc, opts) \ >> static struct mtx_args name##_args = { \ >> (mtx), \ >> (desc), \ >> (opts) \ >> }; \ >> SYSINIT(name##_mtx_sysinit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ >> mtx_sysinit, &name##_args); \ >> SYSUNINIT(name##_mtx_sysuninit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ >> _mtx_destroy, __DEVOLATILE(void *, &(mtx)->mtx_lock)) >> >> I'm just not sure that I would like the use of __DEVOLATILE() even if >> it would help in this case when introducing MTX_SYSINIT_UNSHARE() >> because we will just need to reuse the same code. >> >> Also, the more I think about this the more I feel convinced that >> mtxlock2mtx() should be static in kern_mutex.c. I can simply add a >> note to _mutex.h as a reminder for it. > > Here is the patch that does both things and the one I would like to commit: > http://www.freebsd.org/~attilio/mtx_decoupled3.patch BTW, I've updated the patch in order to make use of __containerof() rather than the manual frobbing. I had no idea that this method was existing, many thanks to andre@ and mdf@ for signaling it. Please refresh the patch. Attilio -- Peace can only be achieved by understanding - A. Einstein