From: Ingo Molnar <mingo@kernel.org>
To: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
Jim Keniston <jkenisto@linux.vnet.ibm.com>,
LKML <linux-kernel@vger.kernel.org>,
Linux-mm <linux-mm@kvack.org>, Oleg Nesterov <oleg@redhat.com>,
Andi Kleen <andi@firstfloor.org>,
Christoph Hellwig <hch@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Arnaldo Carvalho de Melo <acme@infradead.org>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 2/2] uprobes/core: counter to optimize probe hits.
Date: Fri, 23 Mar 2012 13:45:07 +0100 [thread overview]
Message-ID: <20120323124507.GI13920@gmail.com> (raw)
In-Reply-To: <20120321180826.22773.57531.sendpatchset@srdronam.in.ibm.com>
* Srikar Dronamraju <srikar@linux.vnet.ibm.com> wrote:
> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> index 9ade86e..62d5aeb 100644
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -390,6 +390,7 @@ struct mm_struct {
> struct cpumask cpumask_allocation;
> #endif
> #ifdef CONFIG_UPROBES
> + atomic_t mm_uprobes_count;
> struct uprobes_xol_area *uprobes_xol_area;
> #endif
Since mm_types.h includes uprobes.h already it's much better to
stick this into a 'struct uprobes_state' and thus keep the main
'struct mm_struct' definition as simple as possible.
Also, your patch titles suck:
- no proper capitalization like you can observe with previous
uprobes commits
- extra period at the end
- missing verb from the sentence. Check existing uprobes
commits to see the kind of sentences that commit titles are
expected to be.
> + if (!atomic_read(&uprobe_events) || !valid_vma(vma, false))
> + return; /* Bail-out */
> +
> + if (!atomic_read(&vma->vm_mm->mm_uprobes_count))
> + return;
> +
> + inode = vma->vm_file->f_mapping->host;
> + if (!inode)
> + return;
The 'Bail-out' comment tacked on to one of the returns seems
entirely superfluous.
> + if (vaddr >= vma->vm_start && vaddr < vma->vm_end) {
> +
> + /*
That newline looks superfluous too.
> + return;
> +}
Please read your own patches more carefully ... this should
stick out like a sore thumb.
Some of the above comments apply to your other patch as well.
The structure and granularity of the patches looks good
otherwise.
Thanks,
Ingo
next prev parent reply other threads:[~2012-03-23 12:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-21 18:08 [PATCH 1/2] uprobes/core: slot allocation Srikar Dronamraju
2012-03-21 18:08 ` [PATCH 2/2] uprobes/core: counter to optimize probe hits Srikar Dronamraju
2012-03-23 12:45 ` Ingo Molnar [this message]
2012-03-30 13:05 ` Oleg Nesterov
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=20120323124507.GI13920@gmail.com \
--to=mingo@kernel.org \
--cc=acme@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=ananth@in.ibm.com \
--cc=andi@firstfloor.org \
--cc=hch@infradead.org \
--cc=jkenisto@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@elte.hu \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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