From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25418 invoked by alias); 10 May 2006 19:16:45 -0000 Received: (qmail 25409 invoked by uid 22791); 10 May 2006 19:16:43 -0000 X-Spam-Status: No, hits=-3.1 required=5.0 tests=BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from gold.veritas.com (HELO gold.veritas.com) (143.127.12.110) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 10 May 2006 19:16:41 +0000 Received: from sxchcon2-int.veritas.com (HELO SVLXCHCON2.enterprise.veritas.com) ([10.137.18.172]) by gold.veritas.com with ESMTP; 10 May 2006 12:16:40 -0700 X-IronPort-AV: i="4.05,110,1146466800"; d="scan'208"; a="59393866:sNHT29710868" Received: from megami.veritas.com ([10.137.16.7]) by SVLXCHCON2.enterprise.veritas.com with Microsoft SMTPSVC(6.0.3790.211); Wed, 10 May 2006 12:16:38 -0700 Received: from blonde.wat.veritas.com([10.10.97.26]) (2450 bytes) by megami.veritas.com via sendmail with P:esmtp/R:smart_host/T:smtp (sender: ) id for ; Wed, 10 May 2006 08:17:12 -0700 (PDT) (Smail-3.2.0.101 1997-Dec-17 #15 built 2001-Aug-30) Date: Wed, 10 May 2006 19:16:00 -0000 From: Hugh Dickins X-X-Sender: hugh@blonde.wat.veritas.com To: Prasanna S Panchamukhi cc: linux-kernel@vger.kernel.org, systemtap@sources.redhat.com, akpm@osdl.org, Andi Kleen , davem@davemloft.net, suparna@in.ibm.com, richardj_moore@uk.ibm.com, hch@infradead.org Subject: Re: [RFC] [PATCH 6/6] Kprobes: Remove breakpoints from the copied pages In-Reply-To: <20060510121750.GD12463@in.ibm.com> Message-ID: References: <20060509065455.GA11630@in.ibm.com> <20060509065917.GA22493@in.ibm.com> <20060509070106.GB22493@in.ibm.com> <20060509070508.GC22493@in.ibm.com> <20060509070911.GD22493@in.ibm.com> <20060509071204.GE22493@in.ibm.com> <20060509071523.GF22493@in.ibm.com> <20060510121750.GD12463@in.ibm.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 10 May 2006 19:16:38.0808 (UTC) FILETIME=[431CB980:01C67466] Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q2/txt/msg00372.txt.bz2 On Wed, 10 May 2006, Prasanna S Panchamukhi wrote: > > As Andi Kleen and Christoph suggested pagecache contention can be avoided > using the COW approach. Yes, COWing is fine, I've no pagecache qualms if you go that way. > Some thoughts about COW implications AFAIK > 1. Need to hookup mmap() to make a per process copy. I don't understand. > 2. Bring in the pages just to insert the probes. They'll be faulted in to insert probes, yes. > 3. All the text pages need to be in memory until process exits. No, COWed pages can go out to swap. > 4. Free up the per process text pages by hooking exit() and exec(). exit_mmap frees process pages on exit and exec. > 5. Maskoff probes visible across fork(), by hooking fork(). Depends on what semantics you want across fork. Perhaps I don't understand, but you seem to be overcomplicating it, seeing VM (mm) problems which would be automatically handled for you. Wouldn't you just use ptrace(2) to insert and remove your uprobes? See access_process_vm in kernel/ptrace.c for what that would do. It goes on to get_user_pages to do the faulting and COWing. Hugh