Messages in this thread | | | Date | Sun, 21 Jul 2002 22:14:23 -0700 | From | Andrew Morton <> | Subject | Re: [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/
| |