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, Aug 18, 2010 at 12:01:44AM +0900, Minchan Kim wrote:
> On Tue, Aug 17, 2010 at 11:42:46AM +0100, Mel Gorman wrote:
> > On Tue, Aug 17, 2010 at 11:26:05AM +0900, Minchan Kim wrote:
> > > On Tue, Aug 17, 2010 at 1:06 AM, Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
> > > > [npiggin@xxxxxxx bounces, switched to yahoo address]
> > > >
> > > > On Mon, Aug 16, 2010 at 10:43:50AM +0100, Mel Gorman wrote:
> > > 
> > > <snip>
> > > 
> > > >> +      * potentially causing a live-lock. While kswapd is awake and
> > > >> +      * free pages are low, get a better estimate for free pages
> > > >> +      */
> > > >> +     if (nr_free_pages < zone->percpu_drift_mark &&
> > > >> +                     !waitqueue_active(&zone->zone_pgdat->kswapd_wait)) {
> > > >> +             int cpu;
> > > >> +
> > > >> +             for_each_online_cpu(cpu) {
> > > >> +                     struct per_cpu_pageset *pset;
> > > >> +
> > > >> +                     pset = per_cpu_ptr(zone->pageset, cpu);
> > > >> +                     nr_free_pages += pset->vm_stat_diff[NR_FREE_PAGES];
> > > 
> > > We need to consider CONFIG_SMP.
> > > 
> > 
> > We do.
> > 
> > #ifdef CONFIG_SMP
> > unsigned long zone_nr_free_pages(struct zone *zone);
> > #else
> > #define zone_nr_free_pages(zone) zone_page_state(zone, NR_FREE_PAGES)
> > #endif /* CONFIG_SMP */
> > 
> > and a wrapping of CONFIG_SMP around the function in mmzone.c .
> 
> I can't find it in this patch series. 

My bad. What I meant is "You're right, we do need to consider
CONFIG_SMP, how about something like the following";

I've made such a change to my local tree but it was not part of the
released series.

Thanks

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

--
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]