From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8076 invoked by alias); 30 Jun 2009 21:45:17 -0000 Received: (qmail 8067 invoked by uid 22791); 30 Jun 2009 21:45:16 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Jun 2009 21:45:09 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n5ULj7WY001476 for ; Tue, 30 Jun 2009 17:45:07 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5ULj7Jl001487 for ; Tue, 30 Jun 2009 17:45:07 -0400 Received: from [10.16.2.46] (dhcp-100-2-46.bos.redhat.com [10.16.2.46]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5ULj6BC010244; Tue, 30 Jun 2009 17:45:06 -0400 Message-ID: <4A4A8804.1040004@redhat.com> Date: Tue, 30 Jun 2009 21:45:00 -0000 From: Masami Hiramatsu User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Ingo Molnar CC: Ananth N Mavinakayanahalli , lkml , systemtap , DLE , Jim Keniston Subject: Re: [PATCH -tip 3/3] kprobes: cleanup: use list instead of hlist for insn_pages References: <20090630210757.17851.409.stgit@localhost.localdomain> <20090630210814.17851.64651.stgit@localhost.localdomain> <20090630212512.GA10831@elte.hu> In-Reply-To: <20090630212512.GA10831@elte.hu> 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: 2009-q2/txt/msg01088.txt.bz2 Ingo Molnar wrote: > * Masami Hiramatsu wrote: > >> Use struct list instead of struct hlist for managing insn_pages, >> because insn_pages doesn't use hash table. > >> struct kprobe_insn_page { >> - struct hlist_node hlist; >> + struct list_head list; > > Hm, you know that this increases the size of kprobe_insn_page by 4/8 > bytes, right? Sure, that will increase size. > hlists are not just used for hashes - but also when we want a more > compact / smaller list head. Oh, I thought hlists are used for hash tables... > > How many kprobe_insn_page's can be allocated in the system, > maximally? It's depends on how many probes you will use, but logically, 1 kprobe_insn_pages is allocated per 4096/16 = 256 probes. So, if you use 25,600 probes on your system, memory consumption will increase 400/800 bytes. Thank you, -- Masami Hiramatsu Software Engineer Hitachi Computer Products (America), Inc. Software Solutions Division e-mail: mhiramat@redhat.com