From owner-svn-src-user@FreeBSD.ORG Sun Oct 28 21:32:22 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 CBBE2ADA; Sun, 28 Oct 2012 21:32:22 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6C3548FC08; Sun, 28 Oct 2012 21:32:21 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id b5so3389745lbd.13 for ; Sun, 28 Oct 2012 14:32:20 -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=mcsMZNKQPIg2Bno4LoLmqUsoiwjct8DSCzRwBsgI0+I=; b=n3tjnoGsqhk2P8T6/w9SkL/U6E6LDj3W+C6nlQQbeJiQfUzT+cyBQqJELlBgTbAO+3 gdnJJ4VImjQshuiZebHpLQzZVZjskIfhR04H9nqSmINpmCbxmlcP5TS7zKp1DqyNXYC0 zzBwiwVBTyJ/0/fCGYKWEt9pe+ew6RC5K4QviCvR42KoA6qsJgwa+1ooizkZmxjWGNyW P5PoCG1HOoM8I/P0Ky/+9/HO5ZpBH4foZiaTxVE415g2tKdfx3iGUi5YfbCf3EtmCHYn WADVemiEegaOCjL6/rphSnFLD4ZJDK4uFboZ0jgGV7wKYXQHZrv5pNOwCjN6THWcCebD DMCg== MIME-Version: 1.0 Received: by 10.112.41.36 with SMTP id c4mr10571060lbl.75.1351459939991; Sun, 28 Oct 2012 14:32:19 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Sun, 28 Oct 2012 14:32:19 -0700 (PDT) In-Reply-To: <508DA194.6060807@freebsd.org> 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> <508DA194.6060807@freebsd.org> Date: Sun, 28 Oct 2012 21:32:19 +0000 X-Google-Sender-Auth: bIqqyBpklJ9b8zH3UTuoHsal2bQ 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: Andre Oppermann Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, John Baldwin , svn-src-user@freebsd.org, Jeff Roberson , 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: Sun, 28 Oct 2012 21:32:23 -0000 On Sun, Oct 28, 2012 at 9:20 PM, Andre Oppermann wrote: > On 28.10.2012 18:42, Attilio Rao wrote: >> >> On Sat, Oct 27, 2012 at 5:27 PM, Attilio Rao wrote: >>> >>> Here we go with further comments tweaks. >>> Also, in order to make it a complete NOP from KPI perspective I had to >>> change the way the mtx_assert() wrapper was implemented as in v1 it >>> wasn't correctly handling the const qualifier. >>> I think the result is better now and you should refer to this patch for >>> reviews: >>> http://www.freebsd.org/~attilio/mtx_decoupled2.patch > > > Thank you for the updated patch. If the others more versed in this > area are happy with it I'm not objecting. > > >> 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. > > > I'm not really happy about the _unshare naming. Something like > _aligned or _cachline would be much more obvious on what it does. I agree. Infact if we want to apply this to ie. sx locks too _unshared will generate too much confusion (as already reported by Jeff too). I'd say _aligned is good to go. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein