lkml.org 
[lkml]   [2004]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [patch] voluntary-preempt-2.6.8.1-P1

    * Ingo Molnar <mingo@elte.hu> wrote:

    > > Yes, Ingo identified an issue with copy_page_range, I don't think it's
    > > fixed yet. See the voluntary-preempt-2.6.8.1-P0 thread.
    >
    > right, it's not fixed yet. It's not a trivial critical section - we
    > are holding two locks and are mapping two atomic kmaps.

    fortunately it's easier than i thought - neither the source pmd nor the
    target pmd can go away so we can simply drop the locks, reschedule, and
    remap. Does the patch below (ontop of -P3) fix the copy_page_range()
    latencies you are seeing?

    Ingo

    --- linux/mm/memory.c.orig
    +++ linux/mm/memory.c
    @@ -337,6 +337,15 @@ cont_copy_pte_range_noset:
    }
    src_pte++;
    dst_pte++;
    + if (voluntary_need_resched()) {
    + pte_unmap_nested(src_pte);
    + pte_unmap(dst_pte);
    + spin_unlock(&src->page_table_lock);
    + cond_resched_lock(&dst->page_table_lock);
    + spin_lock(&src->page_table_lock);
    + dst_pte = pte_offset_map(dst_pmd, address);
    + src_pte = pte_offset_map_nested(src_pmd, address);
    + }
    } while ((unsigned long)src_pte & PTE_TABLE_MASK);
    pte_unmap_nested(src_pte-1);
    pte_unmap(dst_pte-1);
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-03-22 14:05    [W:4.128 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site