From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754325Ab0JNCim (ORCPT ); Wed, 13 Oct 2010 22:38:42 -0400 Received: from terminus.zytor.com ([198.137.202.10]:38349 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754072Ab0JNCim (ORCPT ); Wed, 13 Oct 2010 22:38:42 -0400 X-User-Agent: K-9 Mail for Android References: <4CB64D8F.9080800@zytor.com> <4CB65262.3070507@zytor.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [patch] x86: allow ZONE_DMA to be configurable From: "H. Peter Anvin" Date: Wed, 13 Oct 2010 19:38:03 -0700 To: David Rientjes CC: Ingo Molnar , Thomas Gleixner , Casey Dahlin , x86@kernel.org, linux-kernel@vger.kernel.org Message-ID: <2d51a48e-0413-4bfb-b877-f6ebc4642f14@email.android.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org How do you know it is not a fatal condition? "David Rientjes" wrote: >On Wed, 13 Oct 2010, H. Peter Anvin wrote: > >> And the value of those additional options is what? I'd consider adding >> this to the sewer pit called CONFIG_EMBEDDED (with a BUG_ON, not a >> warning... sheesh) > >BUG_ON() could panic the machine which would be rather unfortunate if we >simply tried to load a driver that the kernel no longer supports because >it doesn't have DMA. A WARN_ON() seems much more appropriate to identify >what the problem was. It's not a fatal condition. > >> but only if there is any demonstrable value other >> than a trivial amount of code (kilobytes?) in exchange for a bunch of >> crap #ifdef. >> > >The data savings is about 1% and the text savings is about 0.1% with all >three options disabled: > >7922297 1245500 989600 10157397 9afd55 vmlinux.before >7914674 1232700 989472 10136846 9aad0e vmlinux.after > >This is the only #ifdef necessary to make CONFIG_ZONE_DMA=n compile and >CONFIG_GENERIC_ISA_DMA=n would require two additional #ifdefs >(CONFIG_ISA_DMA_API=n would require none). We carry this patch >internally, so it would be trivial to send follow-up patches that do that >if this patch is merged. -- Sent from my mobile phone. Please pardon any lack of formatting.