[PATCH] powerpc: thp: Use tlbiel wherever possible

Aneesh Kumar K.V aneesh.kumar at linux.vnet.ibm.com
Thu Aug 7 16:04:45 EST 2014


Benjamin Herrenschmidt <benh at kernel.crashing.org> writes:

> On Wed, 2014-08-06 at 20:16 +0530, Aneesh Kumar K.V wrote:
>> "Aneesh Kumar K.V" <aneesh.kumar at linux.vnet.ibm.com> writes:
>> 
>> > If we know that user address space has never executed on other cpus
>> > we could use tlbiel.
>> >
>> > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>
>> 
>> 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



More information about the Linuxppc-dev mailing list