flush_tlb_all in vmalloc_area_pages

Andrea Arcangeli (andrea@suse.de)
Fri, 7 Sep 2001 16:56:12 +0200


can somebody see a good reason for flushing the tlb in vmalloc? We must
do that in vfree but doing it in vmalloc is just a waste of time, we are
guaranteed that's an unmapped space before we start setting up the
pagetables so such address space cannot be cached in any tlb in first
place.

For the flush_cache_all for the virtually indexed caches should be the
same issue in theory (at least the kmap logic only needs to flush the
caches before the unmapping [not before the mapping] too)

Am I missing something, Dave?

--- 2.4.10pre4aa1/mm/vmalloc.c.~1~ Sat May 26 04:03:50 2001
+++ 2.4.10pre4aa1/mm/vmalloc.c Fri Sep 7 16:53:41 2001
@@ -144,7 +144,6 @@
int ret;

dir = pgd_offset_k(address);
- flush_cache_all();
spin_lock(&init_mm.page_table_lock);
do {
pmd_t *pmd;
@@ -164,7 +163,6 @@
ret = 0;
} while (address && (address < end));
spin_unlock(&init_mm.page_table_lock);
- flush_tlb_all();
return ret;
}

Andrea
-
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/