Thread (5 messages) flat view 5 messages, 3 authors, 2014-08-07

Re: [PATCH] powerpc: thp: Use tlbiel wherever possible

From: Aneesh Kumar K.V <hidden>
Date: 2014-08-07 06:05:09

Benjamin Herrenschmidt [off-list ref] writes:
On Wed, 2014-08-06 at 20:16 +0530, Aneesh Kumar K.V wrote:
quoted
"Aneesh Kumar K.V" [off-list ref] writes:
quoted
If we know that user address space has never executed on other cpus
we could use tlbiel.

Signed-off-by: Aneesh Kumar K.V <redacted>
Now checking against flush_hash_page, I am wondering whether I need to handle
transcational memory in case of tlbiel ? Michael, can you let me know if
this is needed ?
Also, beware that we have code that sets "tlbiel" in the page definition
array to 0 on all but 4k and 64k pages...
Ok we use base page size to determine whether we can use tlbiel or not. 

static inline void tlbie(unsigned long vpn, int psize, int apsize,
			 int ssize, int local)
{
....
	if (use_local)
		use_local = mmu_psize_defs[psize].tlbiel;

With that we should be ok, because we are using 4k and 64k base page
size and we have

/*
 * We don't know for sure what's up with tlbiel, so
 * for now we only set it for 4K and 64K pages
 */
if (base_idx == MMU_PAGE_4K || base_idx == MMU_PAGE_64K)
	def->tlbiel = 1;
else
	def->tlbiel = 0;


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