From owner-svn-src-all@FreeBSD.ORG Mon Dec 12 17:05:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C501B106564A; Mon, 12 Dec 2011 17:05:15 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id D17BA8FC15; Mon, 12 Dec 2011 17:05:14 +0000 (UTC) Received: by wgbdr11 with SMTP id dr11so11742286wgb.31 for ; Mon, 12 Dec 2011 09:05:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=S5ocepTA4NFwRNMjPg/nRk4uawmXUhhmsAt6lfKRkPY=; b=s1MYCeWotWuiQdwSwryss6hddt8Tvnx8ChbcO6EpMmC4tLAZqvk3rtc1rfrDrJOIfQ OydYXwOtXsxYRuanax3612MBtBWj9IQ+OIHqy/Su3ZBJke8/w9bSDRavJ3BKhhl+TDZO 2l8dMdKTDoCQ90zVlYi2E00qoKmDuwW1GzMs0= MIME-Version: 1.0 Received: by 10.227.60.4 with SMTP id n4mr14865331wbh.9.1323709513598; Mon, 12 Dec 2011 09:05:13 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.216.171.8 with HTTP; Mon, 12 Dec 2011 09:05:13 -0800 (PST) In-Reply-To: References: <201112121005.pBCA5Dar093711@svn.freebsd.org> <20111212101558.GK50300@deviant.kiev.zoral.com.ua> <4EE5D574.9080303@FreeBSD.org> Date: Mon, 12 Dec 2011 18:05:13 +0100 X-Google-Sender-Auth: 3FOe0PLB1NH1w3uL7E8aJhoNiww Message-ID: From: Attilio Rao To: Andriy Gapon Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228433 - in head/sys: kern security/mac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2011 17:05:15 -0000 2011/12/12 Attilio Rao : > 2011/12/12 Andriy Gapon : >> on 12/12/2011 12:15 Kostik Belousov said the following: >>> On Mon, Dec 12, 2011 at 10:05:13AM +0000, Andriy Gapon wrote: >>>> Author: avg >>>> Date: Mon Dec 12 10:05:13 2011 >>>> New Revision: 228433 >>>> URL: http://svn.freebsd.org/changeset/base/228433 >>>> >>>> Log: >>>> =C2=A0 put sys/systm.h at its proper place or add it if missing >>>> >>>> =C2=A0 Reported by: =C2=A0 =C2=A0 =C2=A0 lstewart, tinderbox >>>> =C2=A0 Pointyhat to: =C2=A0 =C2=A0 =C2=A0avg, attilio >>>> =C2=A0 MFC after: 1 week >>>> =C2=A0 MFC with: =C2=A0r228430 >>>> >>>> Modified: >>>> =C2=A0 head/sys/kern/kern_sx.c >>>> =C2=A0 head/sys/kern/vfs_cache.c >>>> =C2=A0 head/sys/security/mac/mac_framework.c >>>> =C2=A0 head/sys/security/mac/mac_priv.c >>> It means that previously sx.h did not required systm.h and now it does = ? >>> Might be, you should move SCHEDULER_STOPPED and stop_scheduler declarat= ions >>> into sys/lock.h ? >>> >> >> Strictly speaking it's sys/lockstat.h that now requires systm.h. >> I am not an expert in FreeBSD header file organization, so I will just f= ollow >> whatever the experts advise. > > I think that we should revert this part of the patch and just fix > dtrace_probe() for pollution, this way we get the same effect and > avoid namespace pollution (and still improve the MFC situation). > > I'll make a patch available in the next hour. More precisely, what do you think about the patch below? I just didn't revert the moving of systm.h under param.h because Bruce seems to prefer that. I'm starting test-compile right now, let me know your preference. Attilio Index: sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c (revision 228438) +++ sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c (working co= py) @@ -5877,6 +5877,9 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintp volatile uint16_t *flags; hrtime_t now; + if (SCHEDULER_STOPPED()) + return; + #if defined(sun) /* * Kick out immediately if this CPU is still being born (in which c= ase Index: sys/security/mac/mac_priv.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/security/mac/mac_priv.c (revision 228438) +++ sys/security/mac/mac_priv.c (working copy) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include "opt_mac.h" #include -#include #include #include #include Index: sys/sys/lockstat.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/sys/lockstat.h (revision 228438) +++ sys/sys/lockstat.h (working copy) @@ -185,24 +185,17 @@ extern uint64_t lockstat_nsecs(void); #define LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(probe, lp, c, wt, f, l) do { \ uint32_t id; = \ = \ - if (!SCHEDULER_STOPPED()) { = \ - lock_profile_obtain_lock_success(&(lp)->lock_object, c, wt,= \ - f, l); = \ - if ((id =3D lockstat_probemap[(probe)])) = \ - (*lockstat_probe_func)(id, (uintptr_t)(lp), 0, 0, = \ - 0, 0); = \ - } = \ + lock_profile_obtain_lock_success(&(lp)->lock_object, c, wt, f, l); = \ + if ((id =3D lockstat_probemap[(probe)])) = \ + (*lockstat_probe_func)(id, (uintptr_t)(lp), 0, 0, 0, 0); = \ } while (0) #define LOCKSTAT_PROFILE_RELEASE_LOCK(probe, lp) do { \ uint32_t id; = \ = \ - if (!SCHEDULER_STOPPED()) { = \ - lock_profile_release_lock(&(lp)->lock_object); = \ - if ((id =3D lockstat_probemap[(probe)])) = \ - (*lockstat_probe_func)(id, (uintptr_t)(lp), 0, 0, = \ - 0, 0); = \ - } = \ + lock_profile_release_lock(&(lp)->lock_object); = \ + if ((id =3D lockstat_probemap[(probe)])) = \ + (*lockstat_probe_func)(id, (uintptr_t)(lp), 0, 0, 0, 0); = \ } while (0) #else /* !KDTRACE_HOOKS */