From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756129Ab0IUA5f (ORCPT ); Mon, 20 Sep 2010 20:57:35 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:52068 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751865Ab0IUA5e (ORCPT ); Mon, 20 Sep 2010 20:57:34 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 From: KOSAKI Motohiro To: Dave Hansen Subject: Re: [RFCv2][PATCH] add some drop_caches documentation and info messsge Cc: kosaki.motohiro@jp.fujitsu.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, lnxninja@linux.vnet.ibm.com, kamezawa.hiroyu@jp.fujitsu.com, ebiederm@xmission.com In-Reply-To: <1284738841.25231.4387.camel@nimitz> References: <20100917092603.3BD5.A69D9226@jp.fujitsu.com> <1284738841.25231.4387.camel@nimitz> Message-Id: <20100921094658.3BE3.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.50.07 [ja] Date: Tue, 21 Sep 2010 09:57:31 +0900 (JST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Fri, 2010-09-17 at 09:26 +0900, KOSAKI Motohiro wrote: > > > diff -puN fs/drop_caches.c~update-drop_caches-documentation fs/drop_caches.c > > > --- linux-2.6.git/fs/drop_caches.c~update-drop_caches-documentation 2010-09-16 09:43:52.000000000 -0700 > > > +++ linux-2.6.git-dave/fs/drop_caches.c 2010-09-16 09:43:52.000000000 -0700 > > > @@ -47,6 +47,8 @@ int drop_caches_sysctl_handler(ctl_table > > > { > > > proc_dointvec_minmax(table, write, buffer, length, ppos); > > > if (write) { > > > + printk(KERN_NOTICE "%s (%d): dropped kernel caches: %d\n", > > > + current->comm, task_pid_nr(current), sysctl_drop_caches); > > > if (sysctl_drop_caches & 1) > > > iterate_supers(drop_pagecache_sb, NULL); > > > if (sysctl_drop_caches & 2) > > > > Can't you print it only once? > > Sure. But, I also figured that somebody calling it every minute is > going to be much more interesting than something just on startup. > Should we printk_ratelimit() it, perhaps? Umm... every minute drop_caches + printk_ratelimit() mean every drop_caches output printk(). It seems annoying. I'm worry about that I'll see drop_caches's printk fill my syslog. But, It is not strong opinion. Because I don't use every minute drop_caches, then I have no experience such usecase. It's up to you.