Well, you can combine that with something like
static inline void tlb_remove_tlb_entry(tlb, pte, address)
{
if (pte_tlb_hash(pte)) {
if (tlb->start_addr == NOSTART)
tlb->start_addr = address;
tlb->end_addr = address+PAGE_SIZE;
}
}
and then have the tlb_end_vma() do something like
/* No pages mapped? */
if (tlb->start_addr == NOADDR)
return;
pte_remove_range(vma, tlb->start_addr, tlb->end_addr)
tlb->start_addr = NOADDR;
which will bunch them up on a vma granularity (if there is any reason to
do that), while still retaining the optimization that if a VMA was mostly
unmapped you wouldn't need to do a lot of hash table searching because of
the start/end thing.
Linus
-
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/