From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 11 21:38:56 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73BD0106566B; Sun, 11 Jul 2010 21:38:56 +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 D55CE8FC0C; Sun, 11 Jul 2010 21:38:54 +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 AAA04939; Mon, 12 Jul 2010 00:38:51 +0300 (EEST) (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 1OY4Ec-000E8R-LZ; Mon, 12 Jul 2010 00:38:50 +0300 Message-ID: <4C3A39E9.1070505@freebsd.org> Date: Mon, 12 Jul 2010 00:38:49 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100603) MIME-Version: 1.0 To: Jeff Roberson References: <4C246CD0.3020606@freebsd.org> <20100702082754.S14969@maildrop.int.zabbadoz.net> <4C320E6E.4040007@freebsd.org> <20100705171155.K14969@maildrop.int.zabbadoz.net> <4C321409.2070500@freebsd.org> <4C343C68.8010302@freebsd.org> <4C36FB32.30901@freebsd.org> <4C39B0E6.3090400@freebsd.org> <4C39B7DE.3030100@freebsd.org> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Peter Wemm , freebsd-hackers@freebsd.org, Jeff Roberson , Konstantin Belousov , "Bjoern A. Zeeb" Subject: Re: elf obj load: skip zero-sized sections early X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 21:38:56 -0000 on 12/07/2010 00:15 Jeff Roberson said the following: > > On Sun, 11 Jul 2010, Andriy Gapon wrote: > >> >> [oops, sorry, this is not a dup - corrected some omissions/mistakes] >> >> on 11/07/2010 14:54 Andriy Gapon said the following: >>> For completeness, here is a patch that simply drops the inline >>> assembly and the >>> comment about it, and GCC-generated assembly and its diff: >>> http://people.freebsd.org/~avg/dpcpu/pcpu.new.patch >>> http://people.freebsd.org/~avg/dpcpu/dpcpu.new.s >>> http://people.freebsd.org/~avg/dpcpu/dpcpu.new.diff >>> >>> As was speculated above, the only thing really changed is section >>> alignment >>> (from 128 to 4). >> >> After making the above analysis I wondered why we require set_pcpu >> section >> alignment at all. After all, it's not used as loaded, data from the >> section >> gets copied into special per-cpu memory areas. So, logically, it's >> those areas >> that need to be aligned, not the section. > > I appreciate your analysis but I don't understand the motivation for > changing working code. Primary reason is that the "working code" produces zero-sized unused/unnecessary pcpu_set sections. See the subject line. As to why I care about those sections - please see the start of this thread. P.S. Short summary: there is no reason to have zero sized sections; some tools either do not expect them or handle them suboptimally. -- Andriy Gapon