Re: [PATCH 2/3] mm: page allocator: Calculate a better estimate of NR_FREE_PAGES when memory is low and kswapd is awake

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

 



On Wed, 18 Aug 2010 10:55:53 -0500 (CDT)
Christoph Lameter <cl@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Wed, 18 Aug 2010, KAMEZAWA Hiroyuki wrote:
> 
> > BTW, a nitpick.
> >
> > > @@ -143,6 +143,9 @@ static void refresh_zone_stat_thresholds(void)
> > >  		for_each_online_cpu(cpu)
> > >  			per_cpu_ptr(zone->pageset, cpu)->stat_threshold
> > >  							= threshold;
> > > +
> > > +		zone->percpu_drift_mark = high_wmark_pages(zone) +
> > > +					num_online_cpus() * threshold;
> > >  	}
> > >  }
> >
> > This function is now called only at CPU_DEAD. IOW, not called at CPU_UP_PREPARE
> 
> calculate_threshold() does its calculation based on the number of online
> cpus. Therefore the threshold may change if a cpu is brought down.
> 
yes. but why not calculate at bringing up ?

Thanks,
-Kame

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  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]