Skip to contentSkip to conversation

sparc64: Reduce TLB flushes on hugetlb PTE change

PATCH Nitin Gupta 2 participants 3 messages Mar 8, 2016 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

Flush TSB and TLB only at REAL_HPAGE_SIZE boundaries and not at every 8K stride.

Orabug: 22643230

---
 arch/sparc/mm/hugetlbpage.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
arch/sparc/mm/hugetlbpage.c +7 -1
index d8f625c..0f4f320 100644
@@ -182,11 +182,17 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
 
 	addr &= HPAGE_MASK;
 	for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) {
-		set_pte_at(mm, addr, ptep, entry);
+		*ptep = entry;
 		ptep++;
 		addr += PAGE_SIZE;
 		pte_val(entry) += PAGE_SIZE;
 	}
+
+	/* Issue TSB and TLB flush at REAL_HPAGE_SIZE boundaries */
+	flush_tsb_user_page(mm, addr, true);
+	flush_tsb_user_page(mm, addr + REAL_HPAGE_SIZE, true);
+	global_flush_tlb_page(mm, addr);
+	global_flush_tlb_page(mm, addr + REAL_HPAGE_SIZE);
 }
 
 pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
Signature · 1 line
2.6.4
maintainer
#1 lore raw

From: Nitin Gupta <[email protected]>
Date: Mon, 7 Mar 2016 18:23:27 -0800

Quoted 6 lines

Flush TSB and TLB only at REAL_HPAGE_SIZE boundaries and not at every 8K stride.

Orabug: 22643230

Is this an update to your earlier patch?

If so, why aren't you explaining what you have changed?

Also, why haven't you put a proper version indication in the Subject line? Like "v3" or something?

By making more and more work for me like this, you are making it more difficult for me to process my backlog and get to actually reviewing the content of your change and integrating it.

#2 lore raw
In reply to Nitin Gupta
Quoted 10 lines · David Miller

From: Nitin Gupta <[email protected]>
Date: Mon, 7 Mar 2016 18:23:27 -0800

Quoted 6 lines

Flush TSB and TLB only at REAL_HPAGE_SIZE boundaries and not at every 8K stride.

Orabug: 22643230

Is this an update to your earlier patch?

No, this is a separate patch.

Nitin

Quoted 13 lines

If so, why aren't you explaining what you have changed?

Also, why haven't you put a proper version indication in the Subject line? Like "v3" or something?

By making more and more work for me like this, you are making it more difficult for me to process my backlog
and get to actually reviewing the content of your change
and integrating it.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html