This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH -tip 3/3] kprobes: cleanup: use list instead of hlist for insn_pages


Ingo Molnar wrote:
> * Masami Hiramatsu <mhiramat@redhat.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]