From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10943 invoked by alias); 2 Mar 2010 02:55:43 -0000 Received: (qmail 10928 invoked by uid 22791); 2 Mar 2010 02:55:42 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Mar 2010 02:55:36 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o222tYv5008253 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Mar 2010 21:55:34 -0500 Received: from [10.16.2.46] (dhcp-100-2-46.bos.redhat.com [10.16.2.46]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o222tVbk003907; Mon, 1 Mar 2010 21:55:32 -0500 Message-ID: <4B8C7E23.1000302@redhat.com> Date: Tue, 02 Mar 2010 02:55:00 -0000 From: Masami Hiramatsu User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc11 Thunderbird/3.0.1 MIME-Version: 1.0 To: Mathieu Desnoyers CC: Ingo Molnar , Frederic Weisbecker , Ananth N Mavinakayanahalli , lkml , systemtap , DLE , Jim Keniston , Srikar Dronamraju , Christoph Hellwig , Steven Rostedt , "H. Peter Anvin" , Anders Kaseorg , Tim Abbott , Andi Kleen , Jason Baron Subject: Re: [PATCH -tip v3&10 02/18] kprobes: Introduce generic insn_slot framework References: <20100225133342.6725.26971.stgit@localhost6.localdomain6> <20100225133358.6725.82430.stgit@localhost6.localdomain6> <20100225152130.GB12635@Krystal> In-Reply-To: <20100225152130.GB12635@Krystal> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2010-q1/txt/msg00558.txt.bz2 Mathieu Desnoyers wrote: > * Masami Hiramatsu (mhiramat@redhat.com) wrote: >> Make insn_slot framework support various size slots. >> Current insn_slot just supports one-size instruction buffer slot. However, >> kprobes jump optimization needs larger size buffers. > > OK, so you end up having one insn slot cache for kprobes and one insn > slot (eventually) for the static jump patching (which needs larger > instruction slots than kprobes). That seems like a good way to ensure > you do not use more memory than necessary. > > We could possibly go even further and automatically use the right insn > slot cache given the size of the instruction entry that must be added (a > bit like the memory allocator which have different pools for each > allocation order). Sure, that will be simpler interface. > Possibly that using the terminology of "memory pools" rather than > "cache" could be a better fit too. So what this really becomes is an > instruction slot allocator and garbage collector. Ah, right. It would be better to rename kprobe_insn_pool() :) Thank you, -- Masami Hiramatsu e-mail: mhiramat@redhat.com