Lines Matching refs:batch
18 struct mmu_gather_batch *batch; in tlb_next_batch() local
20 batch = tlb->active; in tlb_next_batch()
21 if (batch->next) { in tlb_next_batch()
22 tlb->active = batch->next; in tlb_next_batch()
29 batch = (void *)__get_free_pages(GFP_NOWAIT | __GFP_NOWARN, 0); in tlb_next_batch()
30 if (!batch) in tlb_next_batch()
34 batch->next = NULL; in tlb_next_batch()
35 batch->nr = 0; in tlb_next_batch()
36 batch->max = MAX_GATHER_BATCH; in tlb_next_batch()
38 tlb->active->next = batch; in tlb_next_batch()
39 tlb->active = batch; in tlb_next_batch()
46 struct mmu_gather_batch *batch; in tlb_batch_pages_flush() local
48 for (batch = &tlb->local; batch && batch->nr; batch = batch->next) { in tlb_batch_pages_flush()
49 free_pages_and_swap_cache(batch->pages, batch->nr); in tlb_batch_pages_flush()
50 batch->nr = 0; in tlb_batch_pages_flush()
57 struct mmu_gather_batch *batch, *next; in tlb_batch_list_free() local
59 for (batch = tlb->local.next; batch; batch = next) { in tlb_batch_list_free()
60 next = batch->next; in tlb_batch_list_free()
61 free_pages((unsigned long)batch, 0); in tlb_batch_list_free()
68 struct mmu_gather_batch *batch; in __tlb_remove_page_size() local
76 batch = tlb->active; in __tlb_remove_page_size()
81 batch->pages[batch->nr++] = page; in __tlb_remove_page_size()
82 if (batch->nr == batch->max) { in __tlb_remove_page_size()
85 batch = tlb->active; in __tlb_remove_page_size()
87 VM_BUG_ON_PAGE(batch->nr > batch->max, page); in __tlb_remove_page_size()
135 struct mmu_table_batch *batch; in tlb_remove_table_rcu() local
138 batch = container_of(head, struct mmu_table_batch, rcu); in tlb_remove_table_rcu()
140 for (i = 0; i < batch->nr; i++) in tlb_remove_table_rcu()
141 __tlb_remove_table(batch->tables[i]); in tlb_remove_table_rcu()
143 free_page((unsigned long)batch); in tlb_remove_table_rcu()
148 struct mmu_table_batch **batch = &tlb->batch; in tlb_table_flush() local
150 if (*batch) { in tlb_table_flush()
152 call_rcu(&(*batch)->rcu, tlb_remove_table_rcu); in tlb_table_flush()
153 *batch = NULL; in tlb_table_flush()
159 struct mmu_table_batch **batch = &tlb->batch; in tlb_remove_table() local
161 if (*batch == NULL) { in tlb_remove_table()
162 *batch = (struct mmu_table_batch *)__get_free_page(GFP_NOWAIT | __GFP_NOWARN); in tlb_remove_table()
163 if (*batch == NULL) { in tlb_remove_table()
168 (*batch)->nr = 0; in tlb_remove_table()
171 (*batch)->tables[(*batch)->nr++] = table; in tlb_remove_table()
172 if ((*batch)->nr == MAX_TABLE_BATCH) in tlb_remove_table()
224 tlb->batch = NULL; in tlb_gather_mmu()