From: Ingo Molnar <mingo@kernel.org>
To: Christoph Lameter <cl@linux.com>
Cc: Tejun Heo <tj@kernel.org>,
akpm@linuxfoundation.org, Steven Rostedt <srostedt@redhat.com>,
linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [pchecks v1 4/4] percpu: Add preemption checks to __this_cpu ops
Date: Tue, 24 Sep 2013 17:18:47 +0200 [thread overview]
Message-ID: <20130924151847.GB8494@gmail.com> (raw)
In-Reply-To: <00000141505b72a3-6935722e-fdfb-4c46-b52c-bc40609144ac-000000@email.amazonses.com>
* Christoph Lameter <cl@linux.com> wrote:
> On Tue, 24 Sep 2013, Ingo Molnar wrote:
>
> > During past review of your series Peter Zijlstra very explicitly told you
> > to reuse (and unify with) the preempt checks in lib/smp_processor_id.c!
> > See debug_smp_processor_id().
>
> No he did not. He mentioned something about debug_smp_processor_id() at
> the end of a post after talking about something else. Given your
> comments now I see what was meant. That was not really obvious in the
> first place.
Holy cow, this is what PeterZ wrote to you a week ago:
> +#ifdef CONFIG_PREEMPT
> +extern void this_cpu_preempt_check(void);
> +#else
> +static inline void this_cpu_preempt_check(void) { }
> +#endif
How about re-using debug_smp_processor_id() instead?
http://lkml.org/lkml/2013/9/16/137
Firstly, that sentence is as damn obvious as it gets.
Secondly, even if it wasn't obvious to you, a 'git grep
debug_smp_processor_id' would have told you the story.
Thirdly, if it wasn't obvious to you, and if you didn't think of using git
grep, how about ... asking? If a reviewer gives you review feedback then
you should address _EVERY_ single review feedback and not just ignore
it...
I get the impression that you are trying to deny your excessive sloppiness
in this thread - there's no other way to put it really.
> > The problem isn't just that you are duplicating code and adding
> > unnecessary #ifdefs into the wrong place, the bigger problem is that
> > you are implementing weak checks which creates unnecessary raw_*()
> > pollution all across the kernel.
>
> what kind of idiotic comment is that? I am using a single function
> preemptible(). How is that duplicating anything?
as PeterZ pointed it out, we have well-working preempt checks in
debug_smp_processor_id() / lib/smp_processor_id.c.
Instead of reusing that you created a new preempt check, plopped your new,
25 lines, duplicated check into an ugly #ifdef section into sched/core.c -
see that gem attached further below.
> > Your lack of cooperation is getting ridiculous!
>
> And this kind of insulting behavior is really discouraging people to do
> work on the kernel.
Pointing out your repeated lack of cooperation in this matter is a
statement of facts, not an 'insulting behavior'. Your wasting of other
people's time is simply not acceptable.
That I called you out on it might be embarrassing to you but there's a
really easy solution to that: implement reviewer and maintainer requests
and don't send sloppy patches repeatedly.
Ingo
> Index: linux/kernel/sched/core.c
> ===================================================================
> --- linux.orig/kernel/sched/core.c 2013-09-23 10:24:47.371629684 -0500
> +++ linux/kernel/sched/core.c 2013-09-23 10:24:47.371629684 -0500
> @@ -2566,6 +2566,29 @@ asmlinkage void __sched preempt_schedule
> exception_exit(prev_state);
> }
>
> +#ifdef CONFIG_DEBUG_PREEMPT
> +/*
> + * This function is called if the kernel is compiled with preempt
> + * support for each __this_cpu operations. It verifies that
> + * preemption has been disabled.
> + *
> + * The function cannot be a macro due to the low level nature
> + * of the per cpu header files.
> + */
> +void __this_cpu_preempt_check(void)
> +{
> + int p;
> +
> + p = preemptible();
> + if (p) {
> + printk(KERN_ERR "__this_cpu but preemptable."
> + " preempt_count=%d irqs_disabled=%d\n",
> + preempt_count(), irqs_disabled());
> + dump_stack();
> + }
> +
> +}
> +#endif /* CONFIG_DEBUG_PREEMPT */
> #endif /* CONFIG_PREEMPT */
>
next prev parent reply other threads:[~2013-09-24 15:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130923191256.584672290@linux.com>
2013-09-23 19:12 ` [pchecks v1 2/4] Use raw cpu ops for calls that would trigger with checks Christoph Lameter
2013-09-24 7:28 ` Ingo Molnar
2013-09-24 7:32 ` Ingo Molnar
2013-09-24 12:45 ` Eric Dumazet
2013-09-24 7:34 ` Ingo Molnar
2013-09-23 19:12 ` [pchecks v1 1/4] Subject; percpu: Add raw_cpu_ops Christoph Lameter
2013-09-23 19:24 ` [pchecks v1 4/4] percpu: Add preemption checks to __this_cpu ops Christoph Lameter
2013-09-24 8:03 ` Ingo Molnar
2013-09-24 14:24 ` Christoph Lameter
2013-09-24 15:18 ` Ingo Molnar [this message]
2013-09-24 15:35 ` Christoph Lameter
2013-09-24 17:26 ` Ingo Molnar
2013-09-25 16:46 ` Christoph Lameter
2013-09-25 18:26 ` Ingo Molnar
2013-09-27 14:36 ` Christoph Lameter
2013-09-28 8:52 ` Ingo Molnar
2013-09-23 19:24 ` [pchecks v1 3/4] Use raw_cpu_ops for refresh_cpu_vm_stats() Christoph Lameter
2013-09-24 7:43 ` Ingo Molnar
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=20130924151847.GB8494@gmail.com \
--to=mingo@kernel.org \
--cc=akpm@linuxfoundation.org \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=srostedt@redhat.com \
--cc=tj@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