Re: [RFC] mm: Honor min_free_kbytes set by user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed 10-07-13 01:40:06, Jiri Kosina wrote:
> On Thu, 4 Jul 2013, Michal Hocko wrote:
[...]
> > >From 5f089c0b2a57ff6c08710ac9698d65aede06079f Mon Sep 17 00:00:00 2001
> > From: Michal Hocko <mhocko@xxxxxxx>
> > Date: Thu, 4 Jul 2013 17:15:54 +0200
> > Subject: [PATCH] mm: Honor min_free_kbytes set by user
> > 
> > min_free_kbytes is updated during memory hotplug (by init_per_zone_wmark_min)
> > currently which is right thing to do in most cases but this could be
> > unexpected if admin increased the value to prevent from allocation
> > failures and the new min_free_kbytes would be decreased as a result of
> > memory hotadd.
> > 
> > This patch saves the user defined value and allows updating
> > min_free_kbytes only if it is higher than the saved one.
> > 
> > A warning is printed when the new value is ignored.
> > 
> > Signed-off-by: Michal Hocko <mhocko@xxxxxxx>
> > ---
> >  mm/page_alloc.c | 24 +++++++++++++++++-------
> >  1 file changed, 17 insertions(+), 7 deletions(-)
> > 
> > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> > index 22c528e..9c011fc 100644
> > --- a/mm/page_alloc.c
> > +++ b/mm/page_alloc.c
> > @@ -204,6 +204,7 @@ static char * const zone_names[MAX_NR_ZONES] = {
> >  };
> >  
> >  int min_free_kbytes = 1024;
> > +int user_min_free_kbytes;
> 
> Minor nit: any reason this can't be static?

Yes, it can and should be static. Care to queue a fix in your trivial
tree? I can post a fix if you want.

Thanks
-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]