Lines Matching refs:nr_pages
175 if (rb->nr_pages) in __perf_output_begin()
235 handle->page = (offset >> page_shift) & (rb->nr_pages - 1); in __perf_output_begin()
330 if (!rb->nr_pages) in ring_buffer_init()
668 pgoff_t pgoff, int nr_pages, long watermark, int flags) in rb_alloc_aux() argument
683 watermark = nr_pages << (PAGE_SHIFT - 1); in rb_alloc_aux()
695 max_order = ilog2(nr_pages); in rb_alloc_aux()
699 rb->aux_pages = kcalloc_node(nr_pages, sizeof(void *), GFP_KERNEL, in rb_alloc_aux()
705 for (rb->aux_nr_pages = 0; rb->aux_nr_pages < nr_pages;) { in rb_alloc_aux()
709 order = min(max_order, ilog2(nr_pages - rb->aux_nr_pages)); in rb_alloc_aux()
733 rb->aux_priv = event->pmu->setup_aux(event, rb->aux_pages, nr_pages, in rb_alloc_aux()
775 if (pgoff > rb->nr_pages) in __perf_mmap_to_page()
805 struct perf_buffer *rb_alloc(int nr_pages, long watermark, int cpu, int flags) in rb_alloc() argument
812 size += nr_pages * sizeof(void *); in rb_alloc()
826 for (i = 0; i < nr_pages; i++) { in rb_alloc()
832 rb->nr_pages = nr_pages; in rb_alloc()
856 for (i = 0; i < rb->nr_pages; i++) in rb_free()
864 return rb->nr_pages << page_order(rb); in data_page_nr()
907 struct perf_buffer *rb_alloc(int nr_pages, long watermark, int cpu, int flags) in rb_alloc() argument
924 all_buf = vmalloc_user((nr_pages + 1) * PAGE_SIZE); in rb_alloc()
930 if (nr_pages) { in rb_alloc()
931 rb->nr_pages = 1; in rb_alloc()
932 rb->page_order = ilog2(nr_pages); in rb_alloc()