Lines Matching refs:nr_pages
174 if (rb->nr_pages) in __perf_output_begin()
234 handle->page = (offset >> page_shift) & (rb->nr_pages - 1); in __perf_output_begin()
328 if (!rb->nr_pages) in ring_buffer_init()
630 pgoff_t pgoff, int nr_pages, long watermark, int flags) in rb_alloc_aux() argument
643 max_order = ilog2(nr_pages); in rb_alloc_aux()
656 rb->aux_pages = kcalloc_node(nr_pages, sizeof(void *), GFP_KERNEL, in rb_alloc_aux()
662 for (rb->aux_nr_pages = 0; rb->aux_nr_pages < nr_pages;) { in rb_alloc_aux()
666 order = min(max_order, ilog2(nr_pages - rb->aux_nr_pages)); in rb_alloc_aux()
690 rb->aux_priv = event->pmu->setup_aux(event, rb->aux_pages, nr_pages, in rb_alloc_aux()
709 rb->aux_watermark = nr_pages << (PAGE_SHIFT - 1); in rb_alloc_aux()
735 if (pgoff > rb->nr_pages) in __perf_mmap_to_page()
757 struct ring_buffer *rb_alloc(int nr_pages, long watermark, int cpu, int flags) in rb_alloc() argument
764 size += nr_pages * sizeof(void *); in rb_alloc()
777 for (i = 0; i < nr_pages; i++) { in rb_alloc()
783 rb->nr_pages = nr_pages; in rb_alloc()
815 for (i = 0; i < rb->nr_pages; i++) in rb_free()
823 return rb->nr_pages << page_order(rb); in data_page_nr()
866 struct ring_buffer *rb_alloc(int nr_pages, long watermark, int cpu, int flags) in rb_alloc() argument
881 all_buf = vmalloc_user((nr_pages + 1) * PAGE_SIZE); in rb_alloc()
887 if (nr_pages) { in rb_alloc()
888 rb->nr_pages = 1; in rb_alloc()
889 rb->page_order = ilog2(nr_pages); in rb_alloc()