From: Andrew Morton <akpm@osdl.org>
To: prasanna@in.ibm.com
Cc: ak@suse.de, davem@davemloft.net, suparna@in.ibm.com,
richardj_moore@uk.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [2/3 PATCH] Kprobes: User space probes support- readpage hooks
Date: Mon, 20 Mar 2006 02:53:11 -0800 [thread overview]
Message-ID: <20060320025311.419a44e3.akpm@osdl.org> (raw)
In-Reply-To: <20060320061014.GE31091@in.ibm.com>
Prasanna S Panchamukhi <prasanna@in.ibm.com> wrote:
>
> This patch provides the feature of inserting probes on pages that are
> not present in the memory during registration.
>
> To add readpage and readpages() hooks, two new elements are added to
> the uprobe_module object:
> struct address_space_operations *ori_a_ops;
> struct address_space_operations user_a_ops;
>
> User-space probes allows probes to be inserted even in pages that are
> not present in the memory at the time of registration. This is done
> by adding hooks to the readpage and readpages routines. During
> registration, the address space operation object is modified by
> substituting user-space probes's specific readpage and readpages
> routines. When the pages are read into memory through the readpage and
> readpages address space operations, any associated probes are
> automatically inserted into those pages. These user-space probes
> readpage and readpages routines internally call the original
> readpage() and readpages() routines, and then check whether probes are
> to be added to these pages, inserting probes as necessary. The
> overhead of adding these hooks is limited to the application on which
> the probes are inserted.
>
> During unregistration, care should be taken to replace the readpage and
> readpages hooks with the original routines if no probes remain on that
> application.
>
So... The code's replacing the address_space's address_space_operations
with a copy which has .readpage() and .readpages() modified, because it
happens that filemap_nopage() uses those.
This is all rather hacky.
I think we need to step back and discuss what services this feature is
trying to provide, and how it is to provide them. Your covering
description didn't describe that - it dives straigt into details without
even describing what the patches are trying to achieve.
So. What are we trying to achieve here, and how are we trying to achieve
it? What problems were encountered in the development of the feature and
how were they solved? What alternative solutions were there?
I can mostly work all that out from background knowledge and looking at the
code, but I'd rather hear it from the designers please.
next prev parent reply other threads:[~2006-03-20 10:56 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-20 6:07 [0/3] Kprobes: User space probes support Prasanna S Panchamukhi
2006-03-20 6:09 ` [1/3 PATCH] Kprobes: User space probes support- base interface Prasanna S Panchamukhi
2006-03-20 6:10 ` [2/3 PATCH] Kprobes: User space probes support- readpage hooks Prasanna S Panchamukhi
2006-03-20 6:11 ` [3/3 PATCH] Kprobes: User space probes support- single stepping out-of-line Prasanna S Panchamukhi
2006-03-20 11:09 ` Andrew Morton
2006-03-20 11:24 ` Arjan van de Ven
2006-03-20 14:05 ` Prasanna S Panchamukhi
2006-03-20 14:13 ` Arjan van de Ven
2006-03-20 11:32 ` Nick Piggin
2006-03-20 13:52 ` Prasanna S Panchamukhi
2006-03-20 13:48 ` Prasanna S Panchamukhi
2006-03-20 20:40 ` Andrew Morton
2006-03-21 2:02 ` Prasanna S Panchamukhi
2006-03-21 10:05 ` Andrew Morton
2006-03-21 11:05 ` Richard J Moore
2006-03-21 11:13 ` Suparna Bhattacharya
2006-03-21 12:23 ` Prasanna S Panchamukhi
2006-03-20 10:53 ` Andrew Morton [this message]
2006-03-20 13:48 ` [2/3 PATCH] Kprobes: User space probes support- readpage hooks Prasanna S Panchamukhi
2006-03-21 2:12 ` Andrew Morton
2006-03-21 9:14 ` Richard J Moore
2006-03-21 11:14 ` Christoph Hellwig
2006-03-21 11:38 ` Richard J Moore
2006-03-21 12:40 ` Theodore Ts'o
2006-03-21 11:28 ` Christoph Hellwig
2006-03-21 11:42 ` Richard J Moore
2006-03-21 12:15 ` Christoph Hellwig
2006-03-21 16:17 ` Richard J Moore
2006-03-20 11:10 ` Andrew Morton
2006-03-20 13:59 ` Prasanna S Panchamukhi
2006-03-20 10:42 ` [1/3 PATCH] Kprobes: User space probes support- base interface Andrew Morton
2006-03-20 13:48 ` Prasanna S Panchamukhi
2006-03-21 11:39 ` [0/3] Kprobes: User space probes support Christoph Hellwig
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=20060320025311.419a44e3.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=ak@suse.de \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=prasanna@in.ibm.com \
--cc=richardj_moore@uk.ibm.com \
--cc=suparna@in.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
all inboxes | Powered by JetHome®