mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
x86/mm/tlb: Revert the recent lazy TLB patches
Revert commits:95b0e6357dx86/mm/tlb: Always use lazy TLB mode64482aafe5x86/mm/tlb: Only send page table free TLB flush to lazy TLB CPUsac03158969x86/mm/tlb: Make lazy TLB mode lazier61d0beb579x86/mm/tlb: Restructure switch_mm_irqs_off()2ff6ddf19cx86/mm/tlb: Leave lazy TLB mode at page table free time In order to simplify the TLB invalidate fixes for x86 and unify the parts that need backporting. We'll try again later. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Rik van Riel <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
815f0ddb34
commit
52a288c736
4 changed files with 77 additions and 181 deletions
22
mm/memory.c
22
mm/memory.c
|
|
@ -326,20 +326,16 @@ bool __tlb_remove_page_size(struct mmu_gather *tlb, struct page *page, int page_
|
|||
|
||||
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
|
||||
|
||||
/*
|
||||
* See the comment near struct mmu_table_batch.
|
||||
*/
|
||||
|
||||
static void tlb_remove_table_smp_sync(void *arg)
|
||||
{
|
||||
struct mm_struct __maybe_unused *mm = arg;
|
||||
/*
|
||||
* On most architectures this does nothing. Simply delivering the
|
||||
* interrupt is enough to prevent races with software page table
|
||||
* walking like that done in get_user_pages_fast.
|
||||
*
|
||||
* See the comment near struct mmu_table_batch.
|
||||
*/
|
||||
tlb_flush_remove_tables_local(mm);
|
||||
/* Simply deliver the interrupt */
|
||||
}
|
||||
|
||||
static void tlb_remove_table_one(void *table, struct mmu_gather *tlb)
|
||||
static void tlb_remove_table_one(void *table)
|
||||
{
|
||||
/*
|
||||
* This isn't an RCU grace period and hence the page-tables cannot be
|
||||
|
|
@ -348,7 +344,7 @@ static void tlb_remove_table_one(void *table, struct mmu_gather *tlb)
|
|||
* It is however sufficient for software page-table walkers that rely on
|
||||
* IRQ disabling. See the comment near struct mmu_table_batch.
|
||||
*/
|
||||
smp_call_function(tlb_remove_table_smp_sync, tlb->mm, 1);
|
||||
smp_call_function(tlb_remove_table_smp_sync, NULL, 1);
|
||||
__tlb_remove_table(table);
|
||||
}
|
||||
|
||||
|
|
@ -369,8 +365,6 @@ void tlb_table_flush(struct mmu_gather *tlb)
|
|||
{
|
||||
struct mmu_table_batch **batch = &tlb->batch;
|
||||
|
||||
tlb_flush_remove_tables(tlb->mm);
|
||||
|
||||
if (*batch) {
|
||||
call_rcu_sched(&(*batch)->rcu, tlb_remove_table_rcu);
|
||||
*batch = NULL;
|
||||
|
|
@ -393,7 +387,7 @@ void tlb_remove_table(struct mmu_gather *tlb, void *table)
|
|||
if (*batch == NULL) {
|
||||
*batch = (struct mmu_table_batch *)__get_free_page(GFP_NOWAIT | __GFP_NOWARN);
|
||||
if (*batch == NULL) {
|
||||
tlb_remove_table_one(table, tlb);
|
||||
tlb_remove_table_one(table);
|
||||
return;
|
||||
}
|
||||
(*batch)->nr = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue