linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] uprobes: Cleanup !CONFIG_UPROBES decls, unexport xol_area
Date: Mon, 11 Nov 2013 20:58:36 +0100	[thread overview]
Message-ID: <20131111195836.GA20615@redhat.com> (raw)
In-Reply-To: <20131111084149.GC12405@gmail.com>

On 11/11, Ingo Molnar wrote:
>
> * Oleg Nesterov <oleg@redhat.com> wrote:
>
> > +++ b/kernel/events/uprobes.c
> > @@ -86,6 +86,25 @@ struct return_instance {
> >  };
> >
> >  /*
> > + * On a breakpoint hit, thread contests for a slot.  It frees the
> > + * slot after singlestep. Currently a fixed number of slots are
> > + * allocated.
> > + */
> > +struct xol_area {
>
> So, my main complaint about the uprobes code isn't functional but
> documentational, similar to what I outlined a few days ago: what this
> comment does not explain is exactly what a 'XOL area' is.
>
> You guys are changing code that reads like gobbledygook to people reading
> it for the first time.

Not that I am trying to defense uprobes, but this is equally true for
any piece of kernel code, at least to me ;)

> It's understandable that you want to use
> abbreviations and I don't object against that, but please explain key
> concepts and data structures when they first come up

Well, this patch only move the definition with the comments, but:

> - a very good place
> to do that is in places where key structures are declared.
>
> I didn't find any high level description of the XOL code, one which makes
> clear that how we manage these out of line execution areas:

I have to agree, all these comments do not really help...

> The one that comes closest is:
>
>           * This area will be used for storing instructions for execution out of line.
>
> ... but that is a single sentence and deep inside the XOL code already.

and even this comment should be probably moved up to the "struct xol_area",


> Really, please make a better job of introducing other kernel hackers to
> the code you are writing ...
>
> Maybe even split the XOL code out into kernel/events/uprobes_xol.c or so?

I do not really think a separate uprobes_xol.c makes sense. I think it would
be nice to have the high-level "uprobes design" doc in uprobetracer.txt, or

> That will give a natural place to explain yourselves at the beginning of
> the file.

or even in the beginning of uprobes.c, I agree.

Don't get me wrong, I am not volunteering ;) But at least I'll try to
pay more attention to the comments when I change the code next time.

Oleg.


  reply	other threads:[~2013-11-11 19:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-09 19:03 [PATCH] uprobes: Cleanup !CONFIG_UPROBES decls, unexport xol_area Oleg Nesterov
2013-11-11  7:15 ` Srikar Dronamraju
2013-11-11  8:41 ` Ingo Molnar
2013-11-11 19:58   ` Oleg Nesterov [this message]
2013-11-11 21:03     ` Ingo Molnar
2013-11-19 16:25       ` [PATCH] uprobes: Document xol_area and arch_uprobe->insn/ixol Oleg Nesterov
2013-11-19 19:24         ` Ingo Molnar
2013-11-20 11:03         ` Srikar Dronamraju

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=20131111195836.GA20615@redhat.com \
    --to=oleg@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@kernel.org \
    --cc=srikar@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).