Lines Matching refs:nr_pages
440 unsigned long nr_pages; member
1140 static int __rb_allocate_pages(long nr_pages, struct list_head *pages, int cpu) in __rb_allocate_pages() argument
1145 for (i = 0; i < nr_pages; i++) { in __rb_allocate_pages()
1180 unsigned long nr_pages) in rb_allocate_pages() argument
1184 WARN_ON(!nr_pages); in rb_allocate_pages()
1186 if (__rb_allocate_pages(nr_pages, &pages, cpu_buffer->cpu)) in rb_allocate_pages()
1197 cpu_buffer->nr_pages = nr_pages; in rb_allocate_pages()
1205 rb_allocate_cpu_buffer(struct ring_buffer *buffer, long nr_pages, int cpu) in rb_allocate_cpu_buffer() argument
1245 ret = rb_allocate_pages(cpu_buffer, nr_pages); in rb_allocate_cpu_buffer()
1305 long nr_pages; in __ring_buffer_alloc() local
1318 nr_pages = DIV_ROUND_UP(size, BUF_PAGE_SIZE); in __ring_buffer_alloc()
1327 if (nr_pages < 2) in __ring_buffer_alloc()
1328 nr_pages = 2; in __ring_buffer_alloc()
1351 rb_allocate_cpu_buffer(buffer, nr_pages, cpu); in __ring_buffer_alloc()
1433 rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned long nr_pages) in rb_remove_pages() argument
1469 for (nr_removed = 0; nr_removed < nr_pages; nr_removed++) { in rb_remove_pages()
1630 cpu_buffer->nr_pages += cpu_buffer->nr_pages_to_update; in rb_update_pages()
1655 unsigned long nr_pages; in ring_buffer_resize() local
1669 nr_pages = DIV_ROUND_UP(size, BUF_PAGE_SIZE); in ring_buffer_resize()
1672 if (nr_pages < 2) in ring_buffer_resize()
1673 nr_pages = 2; in ring_buffer_resize()
1675 size = nr_pages * BUF_PAGE_SIZE; in ring_buffer_resize()
1693 cpu_buffer->nr_pages_to_update = nr_pages - in ring_buffer_resize()
1694 cpu_buffer->nr_pages; in ring_buffer_resize()
1753 if (nr_pages == cpu_buffer->nr_pages) in ring_buffer_resize()
1756 cpu_buffer->nr_pages_to_update = nr_pages - in ring_buffer_resize()
1757 cpu_buffer->nr_pages; in ring_buffer_resize()
2411 max_count = cpu_buffer->nr_pages * 100; in rb_set_commit_to_write()
4170 return BUF_PAGE_SIZE * buffer->buffers[cpu]->nr_pages; in ring_buffer_size()
4348 if (cpu_buffer_a->nr_pages != cpu_buffer_b->nr_pages) in ring_buffer_swap_cpu()
4650 unsigned long nr_pages; in rb_cpu_notify() local
4658 nr_pages = 0; in rb_cpu_notify()
4663 if (nr_pages == 0) in rb_cpu_notify()
4664 nr_pages = buffer->buffers[cpu_i]->nr_pages; in rb_cpu_notify()
4665 if (nr_pages != buffer->buffers[cpu_i]->nr_pages) { in rb_cpu_notify()
4672 nr_pages = 2; in rb_cpu_notify()
4674 rb_allocate_cpu_buffer(buffer, nr_pages, cpu); in rb_cpu_notify()