Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757257AbXFMIKA (ORCPT ); Wed, 13 Jun 2007 04:10:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756328AbXFMIJr (ORCPT ); Wed, 13 Jun 2007 04:09:47 -0400 Received: from pasmtpb.tele.dk ([80.160.77.98]:59085 "EHLO pasmtpB.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753167AbXFMIJq (ORCPT ); Wed, 13 Jun 2007 04:09:46 -0400 Date: Wed, 13 Jun 2007 10:10:49 +0200 From: Sam Ravnborg To: Satyam Sharma Cc: Jan Beulich , Venkatesh Pallipadi , Andi Kleen , linux-kernel@vger.kernel.org, patches@x86-64.org Subject: Re: [PATCH] x86: fix improper .init-type section references Message-ID: <20070613081049.GA21364@uranus.ravnborg.org> References: <466EB12B.76E4.0078.0@novell.com> <466EC08A.76E4.0078.0@novell.com> <20070612180002.GC15329@uranus.ravnborg.org> <20070613043526.GA20088@uranus.ravnborg.org> <466FB20D.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1471 Lines: 35 On Wed, Jun 13, 2007 at 01:09:07PM +0530, Satyam Sharma wrote: > > i.e. don't discard anything at build time, and link the .exit.{text, > data} sections > into the kernel image for _all_ archs? (otherwise how do we avoid > special-casing/ > checking for the arch in modpost and warn/not-warn about invalid/valid > cases) > > But then why not simply lose the __exit (and .exit.*) altogether? Because > __exit becomes redundant in the suggested changed semantics -- just mark > all the cleanup code as __init too (when it's built-in, the only > callsite for the > cleanup code would be from the startup code in .init.*, and when modular, > __init and __exit lose all relevance anyway). The reason we do it today is to save memory in a memory constrained environment. So with such a suggestion you should back it up with numbers. How much RAM is wasted by keeping the __init and _exit sections in memory for a normal embedded build? You could try a random defconfig for arm or mips since they are embedded in general. Using defconfig for i386 could tell us a little but not that important. And when evaluating the numbers think of maybe 8 MB RAM in total, no swap storage, and sloow filesystem for permanent storage. Sam - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/