public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Alessio Igor Bogani <abogani@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Avi Kivity <avi@redhat.com>, Chris Metcalf <cmetcalf@tilera.com>,
	Christoph Lameter <cl@linux.com>,
	Geoff Levand <geoff@infradead.org>,
	Gilad Ben Yossef <gilad@benyossef.com>,
	Hakan Akkan <hakanakkan@gmail.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Kevin Hilman <khilman@ti.com>,
	Max Krasnyansky <maxk@qualcomm.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Stephen Hemminger <shemminger@vyatta.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Sven-Thorsten Dietrich <thebigcorporation@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 1/5] user_hooks: New user hooks subsystem
Date: Tue, 31 Jul 2012 16:57:42 +0200	[thread overview]
Message-ID: <20120731145742.GA6934@gmail.com> (raw)
In-Reply-To: <20120731104845.GC17078@somewhere.redhat.com>


* Frederic Weisbecker <fweisbec@gmail.com> wrote:

> On Tue, Jul 31, 2012 at 09:06:40AM +0200, Ingo Molnar wrote:
> > 
> > * Frederic Weisbecker <fweisbec@gmail.com> wrote:
> > 
> > > On Mon, Jul 30, 2012 at 05:08:12PM +0200, Peter Zijlstra wrote:
> > > > On Fri, 2012-07-27 at 17:40 +0200, Frederic Weisbecker wrote:
> > > > > +++ b/kernel/user_hooks.c
> > > > > @@ -0,0 +1,56 @@
> > > > > +#include <linux/user_hooks.h>
> > > > > +#include <linux/rcupdate.h>
> > > > > +#include <linux/sched.h>
> > > > > +#include <linux/percpu.h>
> > > > > +
> > > > > +struct user_hooks {
> > > > > +       bool hooking;
> > > > > +       bool in_user;
> > > > > +};
> > > > 
> > > > I really detest using bool in structures.. but that's just me. Also this
> > > > really wants a comment as to wtf 'hooking' means. in_user I can just
> > > > about guess.
> > > 
> > > I really don't mind changing that to int. I just like them as 
> > > bool because they better describe the purpose of the field.
> > > 
> > > hooking means that the hooks are set (the TIF flag is set on 
> > > the current task and we also handle the exception hooks).
> > > 
> > > I can call that is_hooking instead? And/or add a comment to 
> > > explain the purpose of this.
> > 
> > Please don't use this horrible naming - use something more 
> > technical like struct user_callback and callback::active, ok?
> 
> Ok, user callback should be fine. I'll respin with that.

One problem I have with the word 'hook' is that it's rarely 
clear whether it's used as a noun or a verb - and the naming in 
your patch shows that kind of confusion in action.

'callback', while a longer word, is almost always used as a noun 
within the kernel - and it also has a pretty narrow meaning.

Thanks,

	Ingo

  reply	other threads:[~2012-07-31 14:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27 15:40 [RFC PATCH 0/5] cputime: Generic virtual based cputime accounting Frederic Weisbecker
2012-07-27 15:40 ` [PATCH 1/5] user_hooks: New user hooks subsystem Frederic Weisbecker
2012-07-27 16:40   ` Paul E. McKenney
2012-07-27 16:58     ` Frederic Weisbecker
2012-07-30 15:08   ` Peter Zijlstra
2012-07-30 15:27     ` Steven Rostedt
2012-07-30 16:30       ` Peter Zijlstra
2012-07-30 15:51     ` Frederic Weisbecker
2012-07-30 16:07       ` Steven Rostedt
2012-07-30 16:31         ` Peter Zijlstra
2012-07-30 16:32         ` Peter Zijlstra
2012-07-31  7:06       ` Ingo Molnar
2012-07-31 10:48         ` Frederic Weisbecker
2012-07-31 14:57           ` Ingo Molnar [this message]
2012-07-31 16:14             ` Peter Zijlstra
2012-08-01 12:28               ` Frederic Weisbecker
2012-08-01 12:43                 ` Steven Rostedt
2012-08-01 12:45                   ` Frederic Weisbecker
2012-07-27 15:40 ` [PATCH 2/5] cputime: Don't allow virtual and irq finegrained cputime accounting simultaneously Frederic Weisbecker
2012-07-27 15:40 ` [PATCH 3/5] cputime: Allow dynamic switch between tick/virtual based cputime accounting Frederic Weisbecker
2012-07-27 15:40 ` [PATCH 4/5] cputime: Rename account_system_vtime to account_vtime Frederic Weisbecker
2012-07-27 15:40 ` [PATCH 5/5] cputime: Generic on-demand virtual cputime accounting Frederic Weisbecker

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=20120731145742.GA6934@gmail.com \
    --to=mingo@kernel.org \
    --cc=abogani@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=avi@redhat.com \
    --cc=cl@linux.com \
    --cc=cmetcalf@tilera.com \
    --cc=fweisbec@gmail.com \
    --cc=geoff@infradead.org \
    --cc=gilad@benyossef.com \
    --cc=hakanakkan@gmail.com \
    --cc=hpa@zytor.com \
    --cc=khilman@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxk@qualcomm.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=shemminger@vyatta.com \
    --cc=tglx@linutronix.de \
    --cc=thebigcorporation@gmail.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