Lines Matching refs:batch
177 struct mmu_gather_batch *batch; in tlb_next_batch() local
179 batch = tlb->active; in tlb_next_batch()
180 if (batch->next) { in tlb_next_batch()
181 tlb->active = batch->next; in tlb_next_batch()
188 batch = (void *)__get_free_pages(GFP_NOWAIT | __GFP_NOWARN, 0); in tlb_next_batch()
189 if (!batch) in tlb_next_batch()
193 batch->next = NULL; in tlb_next_batch()
194 batch->nr = 0; in tlb_next_batch()
195 batch->max = MAX_GATHER_BATCH; in tlb_next_batch()
197 tlb->active->next = batch; in tlb_next_batch()
198 tlb->active = batch; in tlb_next_batch()
222 tlb->batch = NULL; in tlb_gather_mmu()
228 struct mmu_gather_batch *batch; in tlb_flush_mmu() local
241 for (batch = &tlb->local; batch; batch = batch->next) { in tlb_flush_mmu()
242 free_pages_and_swap_cache(batch->pages, batch->nr); in tlb_flush_mmu()
243 batch->nr = 0; in tlb_flush_mmu()
254 struct mmu_gather_batch *batch, *next; in tlb_finish_mmu() local
261 for (batch = tlb->local.next; batch; batch = next) { in tlb_finish_mmu()
262 next = batch->next; in tlb_finish_mmu()
263 free_pages((unsigned long)batch, 0); in tlb_finish_mmu()
276 struct mmu_gather_batch *batch; in __tlb_remove_page() local
285 batch = tlb->active; in __tlb_remove_page()
286 batch->pages[batch->nr++] = page; in __tlb_remove_page()
287 if (batch->nr == batch->max) { in __tlb_remove_page()
290 batch = tlb->active; in __tlb_remove_page()
292 VM_BUG_ON(batch->nr > batch->max); in __tlb_remove_page()
294 return batch->max - batch->nr; in __tlb_remove_page()
325 struct mmu_table_batch *batch; in tlb_remove_table_rcu() local
328 batch = container_of(head, struct mmu_table_batch, rcu); in tlb_remove_table_rcu()
330 for (i = 0; i < batch->nr; i++) in tlb_remove_table_rcu()
331 __tlb_remove_table(batch->tables[i]); in tlb_remove_table_rcu()
333 free_page((unsigned long)batch); in tlb_remove_table_rcu()
338 struct mmu_table_batch **batch = &tlb->batch; in tlb_table_flush() local
340 if (*batch) { in tlb_table_flush()
341 call_rcu_sched(&(*batch)->rcu, tlb_remove_table_rcu); in tlb_table_flush()
342 *batch = NULL; in tlb_table_flush()
348 struct mmu_table_batch **batch = &tlb->batch; in tlb_remove_table() local
361 if (*batch == NULL) { in tlb_remove_table()
362 *batch = (struct mmu_table_batch *)__get_free_page(GFP_NOWAIT | __GFP_NOWARN); in tlb_remove_table()
363 if (*batch == NULL) { in tlb_remove_table()
367 (*batch)->nr = 0; in tlb_remove_table()
369 (*batch)->tables[(*batch)->nr++] = table; in tlb_remove_table()
370 if ((*batch)->nr == MAX_TABLE_BATCH) in tlb_remove_table()