lkml.org 
[lkml]   [2012]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] add some drop_caches documentation and info messsge
On Wed 24-10-12 18:35:43, KOSAKI Motohiro wrote:
> >> I have drop_caches in my suspend-to-disk script so that the hibernation
> >> image is kept at minimum and suspend times are as small as possible.
> >
> > hm, that sounds smart.
> >
> >> Would that be a valid use-case?
> >
> > I'd say so, unless we change the kernel to do that internally. We do
> > have the hibernation-specific shrink_all_memory() in the vmscan code.
> > We didn't see fit to document _why_ that exists, but IIRC it's there to
> > create enough free memory for hibernation to be able to successfully
> > complete, but no more.
>
> shrink_all_memory() drop minimum memory to be needed from hibernation.
> that's trade off matter.
>
> - drop all page cache
> pros.
> speed up hibernation time
> cons.
> after go back from hibernation, system works very slow a while until
> system will get enough file cache.
>
> - drop minimum page cache
> pros.
> system works quickly when go back from hibernation.
> cons.
> relative large hibernation time
>
>
> So, I'm not fun change hibernation default. hmmm... Does adding
> tracepint instead of printk makes sense?

I guess you mean trace_printk. I have seen that one for debugging
purposes only but it seems like it could be used here. CONFIG_TRACING
seems to be enabled on the most distribution kernels.

I am just worried it needs debugfs mounted and my recollection is that
this has some security implications so there might be some pushback on
mounting it on production systems which would defeat the primary
motivation.
Maybe this concern is not that important wrt. excessive logging, though.
I can live with this solution as well if people really hate logging
approach.
--
Michal Hocko
SUSE Labs


\
 
 \ /
  Last update: 2012-10-28 00:01    [W:0.343 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site