Re: [PATCH]: Free pages from local pcp lists under tight memory conditions

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

 



On Wed, 23 Nov 2005, Rohit Seth wrote:
> 
> > On Tue, 2005-11-22 at 21:36 -0800, Andrew Morton wrote:

> > > We need to verify that this patch actually does something useful.
> > >
> > >
> > I'm working on this.  Will let you know later today if I can come with
> > some workload easily hitting this additional logic.
> >
> 

I'm able to trigger the reduce_cpu_pcp (I'll change its name in next
update patch) logic after direct reclaim using a small test case hogging
memory and a bash loop spawning another process 1 at a time using very
little memory.

I added a single printk after the direct reclaim where we reduce the per
cpu pagelist (in my patch) just to get the order and how many iterations
do we need to service the request.  order is always 1 (coming from
alloc_thread_info for 8K stack size).

This is on i386 with 8K stack size.

if (order > 0)  {
       int i = 0;
       while (reduce_cpu_pcp()) {
            i++;
            page = get_page_from_freelist(gfp_mask, order, zonelist,
alloc_flags);
            if (page) {
                printk("Got page %d order iteration %d", order, i);
                goto got_pg;
            }
       }
}

And got about 30 of those in couple of hours:

[17179885.360000] Got page 1 order iteration 1



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux