Lines Matching defs:batch
18 struct mmu_gather_batch *batch;
20 batch = tlb->active;
21 if (batch->next) {
22 tlb->active = batch->next;
29 batch = (void *)__get_free_pages(GFP_NOWAIT | __GFP_NOWARN, 0);
30 if (!batch)
34 batch->next = NULL;
35 batch->nr = 0;
36 batch->max = MAX_GATHER_BATCH;
38 tlb->active->next = batch;
39 tlb->active = batch;
46 struct mmu_gather_batch *batch;
48 for (batch = &tlb->local; batch && batch->nr; batch = batch->next) {
49 free_pages_and_swap_cache(batch->pages, batch->nr);
50 batch->nr = 0;
57 struct mmu_gather_batch *batch, *next;
59 for (batch = tlb->local.next; batch; batch = next) {
60 next = batch->next;
61 free_pages((unsigned long)batch, 0);
68 struct mmu_gather_batch *batch;
76 batch = tlb->active;
81 batch->pages[batch->nr++] = page;
82 if (batch->nr == batch->max) {
85 batch = tlb->active;
87 VM_BUG_ON_PAGE(batch->nr > batch->max, page);
96 static void __tlb_remove_table_free(struct mmu_table_batch *batch)
100 for (i = 0; i < batch->nr; i++)
101 __tlb_remove_table(batch->tables[i]);
103 free_page((unsigned long)batch);
126 * What we do is batch the freed directory pages (tables) and RCU free them.
130 * However, in order to batch these pages we need to allocate storage, this
159 static void tlb_remove_table_free(struct mmu_table_batch *batch)
161 call_rcu(&batch->rcu, tlb_remove_table_rcu);
166 static void tlb_remove_table_free(struct mmu_table_batch *batch)
168 __tlb_remove_table_free(batch);
196 struct mmu_table_batch **batch = &tlb->batch;
198 if (*batch) {
200 tlb_remove_table_free(*batch);
201 *batch = NULL;
207 struct mmu_table_batch **batch = &tlb->batch;
209 if (*batch == NULL) {
210 *batch = (struct mmu_table_batch *)__get_free_page(GFP_NOWAIT | __GFP_NOWARN);
211 if (*batch == NULL) {
216 (*batch)->nr = 0;
219 (*batch)->tables[(*batch)->nr++] = table;
220 if ((*batch)->nr == MAX_TABLE_BATCH)
226 tlb->batch = NULL;