Re: RFC - Approaches to user-space probes
From: Andi Kleen
Date: Tue Mar 28 2006 - 15:42:27 EST
On Tuesday 28 March 2006 22:35, Frank Ch. Eigler wrote:
> Prasanna S Panchamukhi <prasanna@xxxxxxxxxx> writes:
>
> > [...]
> > If the executable is mmaped shared, then those mappings will get written
> > back to the disk.
> > Writting to the disk is not the requirement for user-space probes, it is
> > just the side effect [...]
>
> It's pretty clear that writing the dirtied pages to disk is an
> *undesirable* side-effect, and should be eliminated. (Among many
> other scenarios, imagine a kernel shutting down without all the probes
> being cleanly removed. Then the executables are irretrievably
> corrupted.)
That's pretty hard unfortunately. There are plenty of operations
that just access the page cache directly for IO
(like sendfile or mmap or other IO)
And allocating bounce buffers is tricky because the IO paths
cannot allocate memory reliably without deadlocks (or rather
it would require mempool and other inefficient measures)
Doing forced COW like ptrace is probably more practical.
-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/