Re: [PATCH] Eliminate task stack trace duplication.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 3, 2011 at 12:50 PM, Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:
> Ying Han <yinghan@xxxxxxxxxx> writes:
>
>> The problem with small dmesg ring buffer like 512k is that only limited number
>> of task traces will be logged. Sometimes we lose important information only
>> because of too many duplicated stack traces.
>>
>> This patch tries to reduce the duplication of task stack trace in the dump
>> message by hashing the task stack. The hashtable is a 32k pre-allocated buffer
>> during bootup.
>
> Nice idea!  This makes it a lot more readable too.
>
> Can we compress the register values too? (e.g. by not printing that many
> 0s and replacing ffff8 with <k> or so)
>
> In fact I don't remember needing the register values for anything.
> Maybe they could be just not printed by default?

I can look into that, but i might not have time working on this patch
soon. If this is something
nice to have, maybe we can consider merge the first part in and then
add on top of it?

>
>>  #endif
>>       read_lock(&tasklist_lock);
>> +
>> +     spin_lock(&stack_hash_lock);
>
> The long hold lock scares me a little bit for a unstable system.
> Could you only hold it while hashing/unhashing?

The patch was initially developed on 2.6.26 kernel and I forward
ported to the latest kernel this time. We've been running the 2.6.26
kernel with the patch for quite long time, and haven't noticed the
problem w/ the locking.

>
> Also when you can't get it fall back to something else.

Can you clarify that?

Thank you for reviewing :)

--Ying
>
> -Andi
> --
> ak@xxxxxxxxxxxxxxx -- Speaking for myself only
>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]