From owner-freebsd-current@FreeBSD.ORG Mon Aug 10 18:02:11 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00EA2106566C; Mon, 10 Aug 2009 18:02:11 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C7B888FC31; Mon, 10 Aug 2009 18:02:10 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 60A7046B03; Mon, 10 Aug 2009 14:02:10 -0400 (EDT) Date: Mon, 10 Aug 2009 19:02:10 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Julian Elischer In-Reply-To: <4A805E5B.5000103@elischer.org> Message-ID: References: <20090804225806.GA54680@hub.freebsd.org> <20090805054115.O93661@maildrop.int.zabbadoz.net> <20090805063417.GA10969@doormat.home> <20090810133111.C93661@maildrop.int.zabbadoz.net> <4A805E5B.5000103@elischer.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-current@freebsd.org, Jeff Roberson , "Bjoern A. Zeeb" , kib@FreeBSD.org, Navdeep Parhar , Larry Rosenman , lstewart@FreeBSD.org Subject: Re: reproducible panic in netisr X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2009 18:02:11 -0000 On Mon, 10 Aug 2009, Julian Elischer wrote: >> One possible workaround would be to force the __start_ symbol and the >> section to be equally aligned and thus on the same address using linker >> scripts. The drawbacks are that we need to touch the fragile linker >> scripts for each of the sections we add and for all architectures >> individually. As the enforcement of alignment would be at a different >> place to the actual set creation, putting the alignment in might be easily >> forgotten. > > personally I'd see if there is a way to align the section on a page > boundary.. I'm not sure it matters for the master copy, but I believe some (if not all) architecture MD parts already allocate the per-CPU data areas as page-aligned, and we extend the master copy out to a page boundary. That said, it would be worth checking on a run-time kernel to make sure it works out that way in practice. In the future, we'll want the pages allocated to the DPCPU area to be local to the CPU from a NUMA perspective. >> --- sys/net/vnet.h (revision 196086) >> +++ sys/net/vnet.h (working copy) >> @@ -185,12 +185,14 @@ >> * Virtual network stack memory allocator, which allows global variables >> to >> * be automatically instantiated for each network stack instance. >> */ >> +__asm__( >> #if defined(__arm__) >> -__asm__(".section " VNET_SETNAME ", \"aw\", %progbits"); >> + ".section " VNET_SETNAME ", \"aw\", %progbits\n" >> #else >> -__asm__(".section " VNET_SETNAME ", \"aw\", @progbits"); >> + ".section " VNET_SETNAME ", \"aw\", @progbits\n" >> #endif > > I may be visually impaired but I'm not seeing a reason for the ifdef arm.. I stared at Jeff's original DPCPU code for a while before I saw it -- it's the "%" vs "@" difference. Robert N M Watson Computer Laboratory University of Cambridge