Thread (23 messages) 23 messages, 5 authors, 2016-12-21

Re: [PATCH v3 4/5] powerpc/mm: add radix__remove_section_mapping()

flat view

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2016-12-19 20:59:42

On Mon, 2016-12-19 at 15:18 +0530, Aneesh Kumar K.V wrote:
quoted
+     pte = pte_start + pte_index(addr);
+     for (; addr < end; addr = next, pte++) {
+             next = (addr + PAGE_SIZE) & PAGE_MASK;
+             if (next > end)
+                     next = end;
+
+             if (!pte_present(*pte))
+                     continue;
+
+             spin_lock(&init_mm.page_table_lock);
+             pte_clear(&init_mm, addr, pte);
+             spin_unlock(&init_mm.page_table_lock);
+     }
+
+     flush_tlb_mm(&init_mm);
Why call a flush here. we do that at the end of remove_page_table .
Isn't that sufficient ?
All those lock/unlock ... what for ? Can't we just do the whole page ?

Also I agree, we can delay the flush of the PTEs to the end.

Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help