From owner-svn-src-head@FreeBSD.ORG Fri Nov 12 06:59:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9036B1065672; Fri, 12 Nov 2010 06:59:13 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 40F0A8FC0C; Fri, 12 Nov 2010 06:59:11 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id IAA24173; Fri, 12 Nov 2010 08:59:10 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1PGnbK-000I8i-Fs; Fri, 12 Nov 2010 08:59:10 +0200 Message-ID: <4CDCE56D.9050007@freebsd.org> Date: Fri, 12 Nov 2010 08:57:49 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Dimitry Andric References: <201011111918.oABJIqvH081681@svn.freebsd.org> <4CDC43FE.6060401@freebsd.org> <4CDC45F7.8060506@FreeBSD.org> In-Reply-To: <4CDC45F7.8060506@FreeBSD.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215138 - in head/sys: net sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2010 06:59:13 -0000 on 11/11/2010 21:37 Dimitry Andric said the following: > On 2010-11-11 20:29, Andriy Gapon wrote: >> Do I understand it correctly that set_pcpu section itself would not be >> produced if >> DPCPU_DEFINE() is not actually used? > > Yes, although currently this does not occur in any kernel module (I > tested using make universe). But indeed, if you would include e.g. > vnet.h or pcpu.h, but did not use any VNET_DEFINE or DPCPU_DEFINE > macros, you would get an error during linking. Either I am confused or there is something wrong. I think that we have plenty of modules that do not use DPCPU_DEFINE, but source files of which do include pcpu.h. > The proper fix for this is to use the __GLOBL macros only when actually > invoking the VNET_DEFINE or DPCPU_DEFINE macros, just as with the > __MAKE_SET macro. But this is made more difficult by the fact that many > invocations of VNET_DEFINE and DPCPU_DEFINE are either prefixed with > 'static', or postfixed with '= literal_value'. > > Maybe we could use separate VNET_DEFINE_STATIC and DPCPU_DEFINE_STATIC > macros for this, since it looks like some of the definitions actually > define public variables... -- Andriy Gapon