mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Jaswinder Singh Rajput <jaswinder@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	John Levon <levon@movementarian.org>,
	x86 maintainers <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Robert Richter <robert.richter@amd.com>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [RFC PATCH] x86, oprofile: fix P4 oprofile CPU setup bug
Date: Sun, 5 Apr 2009 23:59:16 +0200	[thread overview]
Message-ID: <20090405215916.GA27633@elte.hu> (raw)
In-Reply-To: <20090405213828.GA1059@elte.hu>


* Ingo Molnar <mingo@elte.hu> wrote:

> Hm, you only seem to be looking at solving that warning message, 
> and your interest does not seem to go outside of that scope at 
> all. Your first fix was to make the message go away, your second 
> fix minimally (tried to address) the review from Linus and did a 
> mechanic change to make the message go away.
> 
> This second change was actually subtly worse than the first one: 
> because it spread the uncleanliness elsewhere. The getting of 
> 'stagger' is in no way central to the code, it does not denote 
> critical sections at all.

btw. - and this is a pet peeve of mine - in the x86 tree we never 
ever "fix" warnings.

Warnings can only be dealt with in two ways correctly:

 - Fix _false positive_ warnings - carefully analyzing and 
   explaining why the warning is a false positive.

 - .. or by fixing _real bugs_, which bugs some warning mechanism
   exposed. The warning there does not need to be 'fixed' - it was
   the canary for a real bug and we fix the _bug_, not the warning. 
   ( the warning does go away but only as a side-effect of the bug
     going away. )

The moment you start 'fixing warnings' (and i note here that you 
seem to be interested in doing many such changes and cleanups, so we 
better talk about this fine distinction), you risk the exact pattern 
that happened above:

... something subtle happened somewhere - and you sent a patch that 
you denoted as a 'fix' in the subject line. Your commit log did not 
show at all whether you understood the full context, and you did not 
analyze the _reason_ for the warning, at all.

I routinely reject such patches, just based on that pattern, even if 
i happen to agree with the change.

They are in fact _actively harmful_, because a poor overworked 
maintainer like me might apply it in a weak moment. [ except Linus, 
who is overworked and still notices such patches but what's new ;-) ]

Instead, if you see such warnings, and dont know why they trigger - 
please send in the message denoted as a bug report. Or if you have a 
guess of a patch but are unsure about a change in any way send in an 
RFC patch and _declare_ the bits you are sure about and the bits you 
are unsure about, and ask specific questions and show how far you 
got in the analysis. It is not a problem to declare the area you 
dont understand - it is useful information to those reading your 
emails. Conversely, the _lack_ of such information is harmful. Ok?

Please dont _ever_ send in patches without a meaningful changelog.

Take this as a warning! ;-)

	Ingo

  reply	other threads:[~2009-04-05 22:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-05 19:12 [PATCH] x86: fix BUG: using smp_processor_id() in preemptible [00000000] code: oprofiled/3319 Jaswinder Singh Rajput
2009-04-05 19:51 ` Linus Torvalds
2009-04-05 20:14   ` Jaswinder Singh Rajput
2009-04-05 21:02     ` Thomas Gleixner
2009-04-05 21:38     ` [RFC PATCH] x86, oprofile: fix P4 oprofile CPU setup bug Ingo Molnar
2009-04-05 21:59       ` Ingo Molnar [this message]
2009-04-06  4:11         ` Jaswinder Singh Rajput
2009-04-06  4:10       ` Jaswinder Singh Rajput

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=20090405215916.GA27633@elte.hu \
    --to=mingo@elte.hu \
    --cc=hpa@zytor.com \
    --cc=jaswinder@kernel.org \
    --cc=levon@movementarian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robert.richter@amd.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®