Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752881Ab0AYGn5 (ORCPT ); Mon, 25 Jan 2010 01:43:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751566Ab0AYGn4 (ORCPT ); Mon, 25 Jan 2010 01:43:56 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:59147 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751104Ab0AYGn4 (ORCPT ); Mon, 25 Jan 2010 01:43:56 -0500 Message-ID: <4B5D3D37.4090107@cn.fujitsu.com> Date: Mon, 25 Jan 2010 14:41:59 +0800 From: Lai Jiangshan User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Frederic Weisbecker CC: Ingo Molnar , LKML , Steven Rostedt , Li Zefan Subject: Re: [RFC PATCH 06/10] ftrace: Release the function hlist if we don't need it anymore References: <1264122982-1553-1-git-send-regression-fweisbec@gmail.com> <1264122982-1553-7-git-send-regression-fweisbec@gmail.com> In-Reply-To: <1264122982-1553-7-git-send-regression-fweisbec@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1476 Lines: 41 Frederic Weisbecker wrote: > After we disable the function profiler, the function hashlist > stays in memory. This is wasteful as nobody needs it anymore, > until the next use if any. > > Release it when we disable the function profiler instead of > resetting it in the next use. > > Signed-off-by: Frederic Weisbecker > Cc: Steven Rostedt > Cc: Li Zefan > Cc: Lai Jiangshan > --- > kernel/trace/ftrace.c | 1 + > kernel/trace/functions_hlist.c | 61 +++++++++++++++++----------------------- > kernel/trace/functions_hlist.h | 1 + > 3 files changed, 28 insertions(+), 35 deletions(-) > > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > index dfd8f7c..0ded01c 100644 > --- a/kernel/trace/ftrace.c > +++ b/kernel/trace/ftrace.c > @@ -509,6 +509,7 @@ ftrace_profile_write(struct file *filp, const char __user *ubuf, > /* > * unregister_ftrace_profiler calls stop_machine > * so this acts like an synchronize_sched. > */ > unregister_ftrace_profiler(); unluckily, when !CONFIG_DYNAMIC_FTRACE, it does not call stop_machine() nor synchronize_sched(), bug here? > + function_hlist_release(); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/