lkml.org 
[lkml]   [2010]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFCv2][PATCH] add some drop_caches documentation and info messsge
From
Date
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?

-- Dave



\
 
 \ /
  Last update: 2010-09-17 17:57    [W:0.940 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site