lkml.org 
[lkml]   [2008]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kprobe: increase kprobe_hash_table size
Andrew Morton wrote:
>> I agree that there may be many opinions about what is the best suited size.
>> Why I chose 512 was that I thought the table (byte) size was less than or
>> equal 4096 even on 64-bit arch.
>
> Well...
>
> text data bss dec hex filename
> 7036 744 9380 17160 4308 kernel/kprobes.o
> 7048 744 73892 81684 13f14 kernel/kprobes.o
>
> That's 64 kbytes more memory. It will be kretprobe_table_locks[] which
> is hurting here, due to the ____cacheline_aligned.

Oops! It's really bad.


> I expected CONFIG_X86_VSMP=y to make this far worse, but fortunately
> that only affects ____cacheline_internodealigned_in_smp.
>
> btw, that array wastes a ton of memory on uniprocessor builds. Using
> ____cacheline_aligned_in_smp should fix that.
>
> Please always check these thigns with /usr/bin/size.

I see. I'll check that and try to find the best way...

> btw2, could/should kprobe_table[] and kretprobe_inst_table[] be
> aggregated into kretprobe_table_locks[]? That would save some memory
> and might save some cache misses as well?

Indeed, thank you for good idea.

> Anyway, enough pos-facto code review. Is this change which you're
> proposing worth increasing kernel memory usage by 64k?

Not really. Hmm, I have to investigate more on this problem.

Thanks a lot.

--
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com



\
 
 \ /
  Last update: 2008-11-08 03:37    [W:0.146 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site