Lines Matching refs:nr_pages
464 unsigned long nr_pages; member
1164 static int __rb_allocate_pages(long nr_pages, struct list_head *pages, int cpu) in __rb_allocate_pages() argument
1169 for (i = 0; i < nr_pages; i++) { in __rb_allocate_pages()
1204 unsigned long nr_pages) in rb_allocate_pages() argument
1208 WARN_ON(!nr_pages); in rb_allocate_pages()
1210 if (__rb_allocate_pages(nr_pages, &pages, cpu_buffer->cpu)) in rb_allocate_pages()
1221 cpu_buffer->nr_pages = nr_pages; in rb_allocate_pages()
1229 rb_allocate_cpu_buffer(struct ring_buffer *buffer, long nr_pages, int cpu) in rb_allocate_cpu_buffer() argument
1269 ret = rb_allocate_pages(cpu_buffer, nr_pages); in rb_allocate_cpu_buffer()
1329 long nr_pages; in __ring_buffer_alloc() local
1342 nr_pages = DIV_ROUND_UP(size, BUF_PAGE_SIZE); in __ring_buffer_alloc()
1351 if (nr_pages < 2) in __ring_buffer_alloc()
1352 nr_pages = 2; in __ring_buffer_alloc()
1375 rb_allocate_cpu_buffer(buffer, nr_pages, cpu); in __ring_buffer_alloc()
1457 rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned long nr_pages) in rb_remove_pages() argument
1493 for (nr_removed = 0; nr_removed < nr_pages; nr_removed++) { in rb_remove_pages()
1654 cpu_buffer->nr_pages += cpu_buffer->nr_pages_to_update; in rb_update_pages()
1679 unsigned long nr_pages; in ring_buffer_resize() local
1693 nr_pages = DIV_ROUND_UP(size, BUF_PAGE_SIZE); in ring_buffer_resize()
1696 if (nr_pages < 2) in ring_buffer_resize()
1697 nr_pages = 2; in ring_buffer_resize()
1699 size = nr_pages * BUF_PAGE_SIZE; in ring_buffer_resize()
1717 cpu_buffer->nr_pages_to_update = nr_pages - in ring_buffer_resize()
1718 cpu_buffer->nr_pages; in ring_buffer_resize()
1777 if (nr_pages == cpu_buffer->nr_pages) in ring_buffer_resize()
1780 cpu_buffer->nr_pages_to_update = nr_pages - in ring_buffer_resize()
1781 cpu_buffer->nr_pages; in ring_buffer_resize()
1942 max_count = cpu_buffer->nr_pages * 100; in rb_set_commit_to_write()
4162 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()
4653 unsigned long nr_pages; in rb_cpu_notify() local
4661 nr_pages = 0; in rb_cpu_notify()
4666 if (nr_pages == 0) in rb_cpu_notify()
4667 nr_pages = buffer->buffers[cpu_i]->nr_pages; in rb_cpu_notify()
4668 if (nr_pages != buffer->buffers[cpu_i]->nr_pages) { in rb_cpu_notify()
4675 nr_pages = 2; in rb_cpu_notify()
4677 rb_allocate_cpu_buffer(buffer, nr_pages, cpu); in rb_cpu_notify()