public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Jackson <pj@sgi.com>,
	hpa@zytor.com, yhlu.kernel@gmail.com, akpm@linux-foundation.org,
	tglx@linutronix.de, steiner@sgi.com, travis@sgi.com,
	linux-kernel@vger.kernel.org, ying.huang@intel.com,
	andi@firstfloor.org, Sam Ravnborg <sam@ravnborg.org>,
	Vegard Nossum <vegard.nossum@gmail.com>
Subject: Re: [PATCH 4/5 v2] x86 boot: show pfn addresses in hex not decimal in some kernel info printks
Date: Wed, 25 Jun 2008 16:53:31 +0200	[thread overview]
Message-ID: <20080625145331.GA20941@elte.hu> (raw)
In-Reply-To: <alpine.LFD.1.10.0806242101460.20369@hp.linux-foundation.org>


* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> The format warnings are too useful to drop entirely. I guess sparse 
> could be taught to do them, and then we could drop the gcc support for 
> them. But that would still limit coverage a _lot_.

i think the main problem with Sparse isnt even technical but just a few 
minor gotchas IMO that artificially work against the widespread use of 
Sparse in various common workflows.

Sparse is a cool tool that extends upon C types (and more), but it's 
been made too hard to use widely:

 - right now it's opt-in with no ability for testers to use it
   transparently while also building the kernel. Forcing a second
   kernel build just for 'debugging' reduces the userbase.

 - it produces way too much output for people to act upon and see any 
   real "improvement" in the end result. (Obviously this is partly a 
   side-effect of its shallow use.) Producing too much output by default 
   reduces the userbase further.

 - delta analysis (watching what new Sparse warnings pop up) is 
   possible, Al Viro has the "remapper" tool:

      git://git.kernel.org/pub/scm/linux/kernel/git/viro/remapper.git/

   but forcing delta analysis as the only viable Sparse use poses yet 
   another barrier against use and does not allow state-less,
   single-pass test feedback.

There are simpler tools (like for example checkpatch.pl) which are much 
cruder in many aspects, but still they are used much more because they 
do not have such basic usage problems. The artificial limitations on 
Sparse usage keep it from being the tool it could be, IMO.

A tool that has quality assurance effects _must_ be actionable by a 
broad developer base and needs to be no-hassle enabled by testers - 
otherwise it will just drown in sheer entropy.

Fortunately these problems are all solvable gradually:

 - a kbuild mechanism to get _parallel_ Sparse checks. I.e. both the 
   real .o gets produced but also the "make C=1" output is produced. 
   Testers would be enabled to do Sparse checks "alongside" of a normal 
   kernel build. (Sparse is plenty fast for this to be practical)

 - kbuild mechanism with which subsystem maintainers could mark specific 
   files (or all of their subdirectories) of their subsystem as to be 
   Sparse-checked by default. [if a .config debug option is enabled]
   For example we'd mark all of arch/x86/*.o and kernel/sched*.o in such 
   a way for example.

 - a second layer would be very useful as well: failures would turn into 
   build failures if a debug .config switch is enabled.

this (and i'm sure some other, simple measures) would push Sparse into 
the mainstream and it would allow us to integrate it into existing 
practices of automated testing.

if we did all that Sparse might even turn into the native, built-in 
Linux kernel compiler of the future: it already has the hardest bit 
implemented as it can parse the kernel source and generates syntax trees 
from it, generating a real .o from it is just one next step.

On a similar note, it would be nice if subsystem maintainers had a 
kbuild mechanism to have the fails they maintain to be built via -Werr 
(if an opt-in .config option is enabled).

I'd enforce it in a heartbeat on all files i'm involved with - but i 
cannot enforce it on the more than 10,000 files the kernel has. Grepping 
the warnings of files i'm interested is not possible reliably from make 
-j builds.

So if someone wants me to try a kbuild patch to that end, i'd love to 
give it a shot :-)

	Ingo

  parent reply	other threads:[~2008-06-25 14:54 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-22 14:21 [PATCH 0/5 v2] x86 boot: various E820 & EFI related fixes - what changed in v2 Paul Jackson
2008-06-22 14:21 ` [PATCH 1/5 v2] x86 boot: e820 code indentation fix Paul Jackson
2008-06-22 14:22 ` [PATCH 2/5 v2] x86 boot: x86_64 efi compiler warning fix Paul Jackson
2008-06-22 14:22 ` [PATCH 3/5 v2] x86 boot: allow overlapping early reserve memory ranges Paul Jackson
2008-06-22 14:22 ` [PATCH 4/5 v2] x86 boot: show pfn addresses in hex not decimal in some kernel info printks Paul Jackson
2008-06-22 19:38   ` Yinghai Lu
2008-06-23 11:09     ` Paul Jackson
2008-06-24 21:29       ` Yinghai Lu
2008-06-25  1:32         ` Paul Jackson
2008-06-25  1:56           ` H. Peter Anvin
2008-06-25  2:17             ` Paul Jackson
2008-06-25  2:18               ` H. Peter Anvin
2008-06-25  2:58                 ` Linus Torvalds
2008-06-25  3:00                   ` Linus Torvalds
2008-06-25  3:08                   ` Paul Jackson
2008-06-25  4:04                     ` Linus Torvalds
2008-06-25  5:01                       ` H. Peter Anvin
2008-06-25 14:42                         ` Linus Torvalds
2008-06-25 15:29                           ` H. Peter Anvin
2008-06-25  8:04                       ` Paul Jackson
2008-06-25 14:53                       ` Ingo Molnar [this message]
2008-06-26 19:14                         ` Sam Ravnborg
2008-06-27 12:00                           ` Ingo Molnar
2008-06-27 21:25                             ` Sam Ravnborg
2008-06-25 15:00                       ` Johannes Berg
2008-06-25 15:19                         ` Linus Torvalds
2008-06-25 15:34                           ` Johannes Berg
2008-06-27 20:43                           ` Denys Vlasenko
2008-06-30  7:58                           ` Alexander van Heukelum
2008-06-25  5:05                   ` H. Peter Anvin
2008-06-22 14:22 ` [PATCH 5/5 v2] x86 boot: more consistently use type int for node ids Paul Jackson
2008-06-24 11:19 ` [PATCH 0/5 v2] x86 boot: various E820 & EFI related fixes - what changed in v2 Ingo Molnar
2008-06-24 11:30   ` Paul Jackson
2008-06-24 15:45     ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2008-06-25  8:56 [PATCH 4/5 v2] x86 boot: show pfn addresses in hex not decimal in some kernel info printks Marco Cesati

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080625145331.GA20941@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.com \
    --cc=sam@ravnborg.org \
    --cc=steiner@sgi.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=travis@sgi.com \
    --cc=vegard.nossum@gmail.com \
    --cc=yhlu.kernel@gmail.com \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox