flush_tlb_all in vmalloc_area_pages

From: Andrea Arcangeli (andrea@suse.de)
Date: Fri Sep 07 2001 - 09:56:12 EST


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/



This archive was generated by hypermail 2b29 : Fri Sep 07 2001 - 21:00:41 EST