lkml.org 
[lkml]   [2002]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] low-latency zap_page_range
Robert Love wrote:
>
> The lock hold time in zap_page_range is horrid.
>

Yes, it is. And although our mandate is to fix things
like this without grafted-on low latency hacks, zap_page_range()
may be one case where simply popping the lock is the best solution.
Not sure.

> ...
> + while (size) {
> + block = (size > ZAP_BLOCK_SIZE) ? ZAP_BLOCK_SIZE : size;
> + end = address + block;
> +
> + spin_lock(&mm->page_table_lock);
> +
> + flush_cache_range(vma, address, end);
> + tlb = tlb_gather_mmu(mm, 0);
> + unmap_page_range(tlb, vma, address, end);
> + tlb_finish_mmu(tlb, address, end);
> +
> + spin_unlock(&mm->page_table_lock);
> +
> + address += block;
> + size -= block;
> + }

This adds probably-unneeded extra work - we shouldn't go
dropping the lock unless that is actually required. ie:
poll ->need_resched first. Possible?

-
-
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 13:27    [W:0.265 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site