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 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. 
Hmm.. :(

-- 
Kind regards,
Minchan Kim

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