2.2.16 VM issues

From: Marcelo Tosatti (marcelo@conectiva.com.br)
Date: Fri Jun 16 2000 - 17:33:09 EDT

  • Next message: George Anzinger: "Re: More PCI races..."

    Andrea,

    I'm resending you Rik's patch but now with CC to the list, so people can
    try it out.
    Basically this patch returns success on do_try_to_free_pages() with any
    small progress made, instead fix-mm-3 behaviour, which returns success
    only if the number of requested pages are freed.
    This gave better VM behaviour, but I still notice problems.

    Now i'll try out to wait on dirty buffers at sync_page_buffers() (like 2.4
    does), which may help.

    --- vmscan.c.orig Fri Jan 3 03:25:04 1997
    +++ vmscan.c Fri Jan 3 03:31:23 1997
    @@ -380,6 +380,8 @@
     static int do_try_to_free_pages(unsigned int gfp_mask)
     {
             int priority;
    + int ret = 0;
    + int swapcount;
             int count = SWAP_CLUSTER_MAX;
     
             lock_kernel();
    @@ -390,6 +392,7 @@
             priority = 6;
             do {
                     while (shrink_mmap(priority, gfp_mask)) {
    + ret = 1;
                             if (!--count)
                                     goto done;
                     }
    @@ -397,15 +400,18 @@
                     /* Try to get rid of some shared memory pages.. */
                     if (gfp_mask & __GFP_IO) {
                             while (shm_swap(priority, gfp_mask)) {
    + ret = 1;
                                     if (!--count)
                                             goto done;
                             }
                     }
     
                     /* Then, try to page stuff out.. */
    + swapcount = count;
                     while (swap_out(priority, gfp_mask)) {
    - if (!--count)
    - goto done;
    + ret = 1;
    + if (!--swapcount)
    + break;
                     }
     
                     shrink_dcache_memory(priority, gfp_mask);
    @@ -417,7 +423,7 @@
                     printk("VM: do_try_to_free_pages failed for %s...\n",
                                     current->comm);
             /* Return success if we freed a page. */
    - return priority >= 0;
    + return ret;
     }
     
     /*

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Fri Jun 16 2000 - 20:45:04 EDT