From: Khalid Aziz <khalid.aziz@xxxxxxxxxx> Date: Tue, 31 Jan 2017 16:38:49 -0700 > Thanks for the feedback. This is very helpful. I checked and it indeed > can cost 50+ cycles even on M7 processor for PSTATE accesses. Consider how many bytes can be copied in 50+ cycles :-) >> On etrap, you change ESTATE_PSTATE{1,2} to have the MCDE bit enabled. >> Then the kernel always runs with ADI enabled. > > Running the kernel with PSTATE.mcde=1 can possibly be problematic as > we had discussed earlier in this thread where keeping PSTATE.mcde > enabled might mean kernel having to keep track of which pages still > have tags set on them or flush tags on every page on free. I will go > through the code again to see if it PSTATE.mcde can be turned on in > kernel all the time, which might be the case if we can ensure kernel > accesses pages with TTE.mcd cleared. If we can clear the tags properly on page release when the page was used for ADI, it can work. One way would be to track the state in the page struct somehow, and in arch_alloc_page() clear the tags if necessary. -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html