From: Thomas Gleixner <tglx@linutronix.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
jbaron@akamai.com, mingo@kernel.org, bigeasy@linutronix.de,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] jump_label: Provide static_key_slow_inc_nohp()
Date: Wed, 19 Apr 2017 11:08:35 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1704191107170.1829@nanos> (raw)
In-Reply-To: <20170419063918.3z2ndmmtn2xwrb6r@hirez.programming.kicks-ass.net>
On Wed, 19 Apr 2017, Peter Zijlstra wrote:
> On Tue, Apr 18, 2017 at 10:50:43PM +0200, Thomas Gleixner wrote:
> > On Tue, 18 Apr 2017, Peter Zijlstra wrote:
> > > On Tue, Apr 18, 2017 at 12:46:29PM -0400, Steven Rostedt wrote:
> > > > On Tue, 18 Apr 2017 15:03:50 +0200
> > > > Peter Zijlstra <peterz@infradead.org> wrote:
> > > >
> > > > > +++ b/kernel/padata.c
> > > > > @@ -1008,11 +1008,10 @@ static struct padata_instance *padata_al
> > > > > * parallel workers.
> > > > > *
> > > > > * @wq: workqueue to use for the allocated padata instance
> > > > > - *
> > > > > - * Must be called from a get_online_cpus() protected region
> > > >
> > > > Find the comment redundant?
> > >
> > > Once there's code that enforces it? Yes. Nobody reads comments
> > > ;-)
> >
> > Nobody enables lockdep either .....
>
> In the grand scheme of things, true. But there are more people running
> with lockdep enabled than there are people writing code, of which there
> are more than people reading relevant comments while writing code.
> Therefore having the lockdep annotation is two orders better than a
> comment ;-)
>
> Also, I would argue that an "assert" at the start of a function is a
> fairly readable 'comment' all by itself.
>
> In any case, I don't care too much. But I typically remove such comments
> when I stick a lockdep_assert_held() in.
I think that's wrong. We are striving for better documentation and the
kernel-doc comments above a function are part of that. Calling conventions
are definitely something which belongs there.
Thanks,
tglx
next prev parent reply other threads:[~2017-04-19 9:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 10:32 [PATCH 0/3] more cpu hotplug fail Peter Zijlstra
2017-04-18 10:32 ` [PATCH 1/3] jump_label: Pull get_online_cpus() into generic code Peter Zijlstra
2017-04-20 11:29 ` [tip:smp/hotplug] " tip-bot for Peter Zijlstra (Intel)
2017-04-21 16:08 ` [PATCH 1/3] " Jason Baron
2017-04-21 16:20 ` Peter Zijlstra
2017-04-18 10:32 ` [PATCH 2/3] jump_label: Provide static_key_slow_inc_nohp() Peter Zijlstra
2017-04-18 13:03 ` Peter Zijlstra
2017-04-18 16:46 ` Steven Rostedt
2017-04-18 20:27 ` Peter Zijlstra
2017-04-18 20:50 ` Thomas Gleixner
2017-04-19 6:39 ` Peter Zijlstra
2017-04-19 9:08 ` Thomas Gleixner [this message]
2017-04-19 12:49 ` Steven Rostedt
2017-04-19 14:08 ` Peter Zijlstra
2017-04-19 14:21 ` Steven Rostedt
2017-04-20 11:29 ` [tip:smp/hotplug] jump_label: Provide static_key_slow_inc_cpuslocked() tip-bot for Peter Zijlstra (Intel)
2017-04-18 10:32 ` [PATCH 3/3] perf: Avoid cpu_hotplug_lock r-r recursion Peter Zijlstra
2017-04-20 11:30 ` [tip:smp/hotplug] " tip-bot for Peter Zijlstra (Intel)
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=alpine.DEB.2.20.1704191107170.1829@nanos \
--to=tglx@linutronix.de \
--cc=bigeasy@linutronix.de \
--cc=jbaron@akamai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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®