From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26232 invoked by alias); 4 Jul 2006 22:56:30 -0000 Received: (qmail 26224 invoked by uid 22791); 4 Jul 2006 22:56:29 -0000 X-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_50,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from mail8.hitachi.co.jp (HELO mail8.hitachi.co.jp) (133.145.228.43) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 04 Jul 2006 22:56:26 +0000 Received: from mlsv4.hitachi.co.jp (unknown [133.145.228.16]) by mail8.hitachi.co.jp (Postfix) with ESMTP id 2901D37C86 for ; Wed, 5 Jul 2006 07:56:24 +0900 (JST) Received: from mfilter-s2.hitachi.co.jp by mlsv4.hitachi.co.jp (8.12.10/8.12.10) id k64MuNiB002105; Wed, 5 Jul 2006 07:56:24 +0900 Received: from vshuts2.hitachi.co.jp (unverified) by mfilter-s2.hitachi.co.jp (Content Technologies SMTPRS 4.3.17) with SMTP id ; Wed, 5 Jul 2006 07:56:23 +0900 Received: from hsdlgw92.sdl.hitachi.co.jp ([133.144.7.20]) by vshuts2.hitachi.co.jp with SMTP id M2006070507562332762 ; Wed, 05 Jul 2006 07:56:23 +0900 Received: from vgate2.sdl.hitachi.co.jp by hsdlgw92.sdl.hitachi.co.jp (8.9.3/3.7W06061314) id HAA19768; Wed, 5 Jul 2006 07:56:23 +0900 Received: from maila.sdl.hitachi.co.jp ([133.144.14.196]) by vgate2.sdl.hitachi.co.jp (SAVSMTP 3.1.1.32) with SMTP id M2006070507562212925 ; Wed, 05 Jul 2006 07:56:22 +0900 Received: from [127.0.0.1] ([10.232.9.172]) by maila.sdl.hitachi.co.jp (8.13.1/3.7W04031011) with ESMTP id k64MuMkO009118; Wed, 5 Jul 2006 07:56:22 +0900 Message-ID: <44AAF207.7090908@sdl.hitachi.co.jp> Date: Tue, 04 Jul 2006 22:56:00 -0000 From: Masami Hiramatsu User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: Keshavamurthy Anil S Cc: Ananth N Mavinakayanahalli , SystemTAP , Yumiko Sugita , Satoshi Oshima , Hideo Aoki , Prasanna S Panchamukhi , Jim Keniston Subject: Re: [PATCH]kprobe booster for IA64 References: <4485223C.8090109@sdl.hitachi.co.jp> <20060628190541.A13874@unix-os.sc.intel.com> In-Reply-To: <20060628190541.A13874@unix-os.sc.intel.com> 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-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q3/txt/msg00009.txt.bz2 Hi, Anil Keshavamurthy Anil S wrote: > pre_preempt_count will always be one here, since > notify_die()->atomic_notifier_call_chain()->read_rcu_lock()->preeempt_disable(). > So currently you might be preparing for boosting even for > preemptable code path. Can you verify this. Thank you for the advice! I hadn't realized it. Now, I verified it and had some ideas. The problem comes from reusing the insn buffer, because there might be some processes sleeping on the buffer. So, I think we can avoid this problem as below: First, we disable a kprobe (remove the break). Next, wait until all preempted processes are waken up. And Last, we release its insn buffer to reuse. Then, it will be safe. Because there is no process slept on the buffer. For this purpose, I'd like to use stop_machine_run(). However we can't execute it each releasing time because it is very costly. I think we can resolve it by using garbage collector. I describe my idea below: The kprobe frees its insn slot(buffer) after disable it. Thus, when an insn slot is freed, it will be just marked as a garbage. And when get_insn_slot() can't find any free slot, it will call the garbage collector to try to refill free slots. And the garbage collector uses stop_machine_run() to ensure safety. What do you think about this idea? Best regards, -- Masami HIRAMATSU 2nd Research Dept. Hitachi, Ltd., Systems Development Laboratory E-mail: hiramatu@sdl.hitachi.co.jp (New)E-mail: masami.hiramatsu.pt@hitachi.com (This is available from 8th, Jul)