Lines Matching refs:nr_pages
128 if (unlikely(!rb->nr_pages)) in perf_output_begin()
175 handle->page = (offset >> page_shift) & (rb->nr_pages - 1); in perf_output_begin()
468 pgoff_t pgoff, int nr_pages, long watermark, int flags) in rb_alloc_aux() argument
482 max_order = ilog2(nr_pages); in rb_alloc_aux()
497 rb->aux_pages = kzalloc_node(nr_pages * sizeof(void *), GFP_KERNEL, node); in rb_alloc_aux()
502 for (rb->aux_nr_pages = 0; rb->aux_nr_pages < nr_pages;) { in rb_alloc_aux()
506 order = min(max_order, ilog2(nr_pages - rb->aux_nr_pages)); in rb_alloc_aux()
530 rb->aux_priv = event->pmu->setup_aux(event->cpu, rb->aux_pages, nr_pages, in rb_alloc_aux()
549 rb->aux_watermark = nr_pages << (PAGE_SHIFT - 1); in rb_alloc_aux()
605 if (pgoff > rb->nr_pages) in __perf_mmap_to_page()
627 struct ring_buffer *rb_alloc(int nr_pages, long watermark, int cpu, int flags) in rb_alloc() argument
634 size += nr_pages * sizeof(void *); in rb_alloc()
644 for (i = 0; i < nr_pages; i++) { in rb_alloc()
650 rb->nr_pages = nr_pages; in rb_alloc()
682 for (i = 0; i < rb->nr_pages; i++) in rb_free()
690 return rb->nr_pages << page_order(rb); in data_page_nr()
733 struct ring_buffer *rb_alloc(int nr_pages, long watermark, int cpu, int flags) in rb_alloc() argument
748 all_buf = vmalloc_user((nr_pages + 1) * PAGE_SIZE); in rb_alloc()
754 rb->page_order = ilog2(nr_pages); in rb_alloc()
755 rb->nr_pages = !!nr_pages; in rb_alloc()