From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail144.messagelabs.com (mail144.messagelabs.com [216.82.254.51]) by kanga.kvack.org (Postfix) with SMTP id 984976B0012 for ; Tue, 3 May 2011 14:24:57 -0400 (EDT) Message-ID: <4DC0483F.50609@redhat.com> Date: Tue, 03 May 2011 14:23:59 -0400 From: Rik van Riel MIME-Version: 1.0 Subject: Re: [PATCH] Eliminate task stack trace duplication. References: <1304444135-14128-1-git-send-email-yinghan@google.com> In-Reply-To: <1304444135-14128-1-git-send-email-yinghan@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Ying Han Cc: KOSAKI Motohiro , Minchan Kim , Daisuke Nishimura , Balbir Singh , Tejun Heo , Pavel Emelyanov , KAMEZAWA Hiroyuki , Andrew Morton , Li Zefan , Mel Gorman , Christoph Lameter , Johannes Weiner , Hugh Dickins , Michal Hocko , Salman Qazi , Dave Hansen , Zhu Yanhai , linux-mm@kvack.org On 05/03/2011 01:35 PM, Ying Han wrote: > 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. I like it. I often overlook information from staring myself blind on way too many duplicate 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. This changelog doesn't tell the whole story of what the code does. It appears to store stack traces in the table, and use the hash to look them up. Somehow there's a global pointer, called cur_stack, involved too. The code looks correct, but somehow I'm not happy with it. Having said that, I also don't have ideas on how to make it better. If nobody else knows how to make this code better, maybe it should just be merged as is. I hope someone has ideas, though :) -- All rights reversed -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. 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: email@kvack.org