All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Oleg Nesterov <oleg@redhat.com>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	"Frank Ch. Eigler" <fche@redhat.com>,
	utrace-devel@redhat.com, Alexey Dobriyan <adobriyan@gmail.com>
Subject: Re: [RFC,PATCH 14/14] utrace core
Date: Tue,  1 Dec 2009 15:47:04 -0800 (PST)	[thread overview]
Message-ID: <20091201234704.40D4D86D@magilla.sf.frob.com> (raw)
In-Reply-To: Andi Kleen's message of  Tuesday, 24 November 2009 21:32:27 +0100 <87my2bwtno.fsf@basil.nowhere.org>

> Could we just drop the tracehook layer if this finally merged
> and call the low level functions directly?

We can certainly do appropriate streamlining cleanups later, by all
means.  The original purpose of the tracehook layer is simply this:

A person hacking on core kernel code or arch code should not have to
think about all the innards of tracing (ptrace, utrace, or anything
else).  If he comes across a tracehook_* call, he can just read its
kernel-doc for explanation of its parameters, return value, what it
expects about its context (locking et al), and what the semantic
significance of making that particular call is.  If changes to the
core/arch code in question do not require changing any of those
aspects, then said person need not consider tracing issues further.
If a change to a function's calling interface or contextual
assumptions looks warranted, then he knows he should discuss the
details with some tracing-related folks (i.e. find tracehook.h in
MAINTAINERS and thus get to me and Oleg).

Likewise, a person hacking on tracing code should not have to think
about every corner of interaction with the core code or arch code.
Each tracehook_* call's kernel-doc comments say everything that
matters about how and where it's called.  If some of those details
are problematic for what we want to do inside the tracing code, then
we know we have to hash out the details with the maintainers of the
core or arch code that makes those calls.  Otherwise we can keep our
focus on tracing infrastructure without spending time getting lost
in arcane details of the arch or core kernel code.

These two things seem permanently worthwhile to me: that the core
and arch source code use simple function calls without open-coding
any innards of the tracing infrastructure; and that these functions
have clear and complete documentation about their calling interfaces
and context (locking et al).  I find it natural and convenient that
such calls have a common prefix that makes it obvious to any reader
of the core code what subsystem the call relates to.

Beyond those ideas, I certainly don't care at all what the names of
these functions are, what common prefix is used, or in which source
files those declarations and kernel-doc comments appear.


Thanks,
Roland

  parent reply	other threads:[~2009-12-01 23:47 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-24 20:02 [RFC,PATCH 14/14] utrace core Oleg Nesterov
2009-11-24 20:32 ` Andi Kleen
2009-11-24 20:41   ` Oleg Nesterov
2009-11-24 21:26     ` Andi Kleen
2009-11-24 21:31       ` Frank Ch. Eigler
2009-11-24 21:34         ` Andi Kleen
2009-11-24 21:44       ` Oleg Nesterov
2009-11-25  8:46         ` Andi Kleen
2009-11-25 14:55           ` Oleg Nesterov
2009-11-25 16:00             ` Ingo Molnar
2009-11-25 21:50   ` Christoph Hellwig
2009-12-01 23:47   ` Roland McGrath [this message]
2009-12-01 19:54 ` Peter Zijlstra
2009-12-01 22:08   ` Oleg Nesterov
2009-12-07 18:34     ` Peter Zijlstra
2009-12-08 15:04       ` Oleg Nesterov
2009-12-08 15:29         ` Peter Zijlstra
2009-12-08 16:31           ` Oleg Nesterov
2009-12-08 18:19             ` Peter Zijlstra
2009-12-08 18:37               ` Oleg Nesterov
2009-12-13 20:48               ` Roland McGrath
2009-12-08 15:35         ` Peter Zijlstra
2009-12-08 17:51           ` Oleg Nesterov
2009-12-02  5:44   ` Roland McGrath
2009-12-02 18:34   ` Oleg Nesterov
2009-12-02 18:49   ` Oleg Nesterov
2009-12-05 19:14     ` Roland McGrath
2009-12-14  0:25   ` Roland McGrath
2009-12-14 13:51     ` Peter Zijlstra
2009-12-14 17:41       ` Oleg Nesterov
2009-12-14 19:31         ` Oleg Nesterov
2009-12-14 19:42           ` Roland McGrath
2009-12-16 11:18       ` Roland McGrath
2009-12-14 17:03     ` Oleg Nesterov
2009-12-14 19:44       ` Roland McGrath
2009-12-14 20:24         ` Oleg Nesterov
2009-12-15  2:59           ` Roland McGrath

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=20091201234704.40D4D86D@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=adobriyan@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=fche@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oleg@redhat.com \
    --cc=utrace-devel@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.