From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755102AbXJGVvK (ORCPT ); Sun, 7 Oct 2007 17:51:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751788AbXJGVu5 (ORCPT ); Sun, 7 Oct 2007 17:50:57 -0400 Received: from static-71-162-243-5.phlapa.fios.verizon.net ([71.162.243.5]:43978 "EHLO grelber.thyrsus.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752217AbXJGVu4 (ORCPT ); Sun, 7 Oct 2007 17:50:56 -0400 From: Rob Landley Organization: Boundaries Unlimited To: "Vegard Nossum" Subject: Re: [RFC][PATCH] New message-logging API (kprint) Date: Sun, 7 Oct 2007 16:50:49 -0500 User-Agent: KMail/1.9.6 Cc: "Miguel Ojeda" , "Randy Dunlap" , LKML , "Kyle Moffett" , "Michael Holzheu" , "Joe Perches" , "Dick Streefland" , "Geert Uytterhoeven" , "Jesse Barnes" , "Arnd Bergmann" , "Jan Engelhardt" , "Emil Medve" , "Stephen Hemminger" , "linux@horizon.com" References: <1191528247.13580.11.camel@grianne> <200710051126.50816.rob@landley.net> <19f34abd0710052310r2043f69ew70fe8b5f9ef0493c@mail.gmail.com> In-Reply-To: <19f34abd0710052310r2043f69ew70fe8b5f9ef0493c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200710071650.50627.rob@landley.net> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Saturday 06 October 2007 1:10:26 am Vegard Nossum wrote: > On 10/5/07, Rob Landley wrote: > > The original idea (selectively compile out printk() instances based on > > log level to conserve space) is explicitly not addressed by this patch, > > and in fact this patch might actually make it harder to implement (by > > complicating the code). > > This is wrong. The patch provides log-level-based filtering at compile > time, effectively making the kernel smaller. I made it about halfway through the patch and the only compile time filtering I found was: --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -62,7 +62,10 @@  #define MdpMinorShift 6    #define DEBUG 0 -#define dprintk(x...) ((void)(DEBUG && printk(x))) +#define dprintk(x...)          \ +       if(DEBUG) {             \ +                printk(x);     \ +       } If you say it does, I'll take your word for it, but there's so much churn in there I didn't find it before my interest ran out... Rob -- "One of my most productive days was throwing away 1000 lines of code." - Ken Thompson.