/kernel/events/ |
D | ring_buffer.c | 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() 703 if (get_order((unsigned long)nr_pages * sizeof(void *)) > MAX_ORDER) in rb_alloc_aux() 705 rb->aux_pages = kcalloc_node(nr_pages, sizeof(void *), GFP_KERNEL, in rb_alloc_aux() 711 for (rb->aux_nr_pages = 0; rb->aux_nr_pages < nr_pages;) { in rb_alloc_aux() 715 order = min(max_order, ilog2(nr_pages - rb->aux_nr_pages)); in rb_alloc_aux() [all …]
|
D | internal.h | 20 int nr_pages; /* nr of data pages */ member 73 if (!pause && rb->nr_pages) in rb_toggle_paused() 80 rb_alloc(int nr_pages, long watermark, int cpu, int flags); 83 pgoff_t pgoff, int nr_pages, long watermark, int flags); 121 return rb->nr_pages << page_order(rb); in data_page_nr() 126 return rb->nr_pages << (PAGE_SHIFT + page_order(rb)); in perf_data_size() 152 handle->page &= rb->nr_pages - 1; \
|
D | core.c | 5819 if (!rb || !rb->nr_pages) { in _perf_ioctl() 6309 unsigned long nr_pages; in perf_mmap() local 6331 nr_pages = (vma_size / PAGE_SIZE) - 1; in perf_mmap() 6343 nr_pages = vma_size / PAGE_SIZE; in perf_mmap() 6365 if (aux_size != vma_size || aux_size != nr_pages * PAGE_SIZE) in perf_mmap() 6369 if (rb_has_aux(rb) && rb->aux_nr_pages != nr_pages) in perf_mmap() 6372 if (!is_power_of_2(nr_pages)) in perf_mmap() 6385 user_extra = nr_pages; in perf_mmap() 6394 if (nr_pages != 0 && !is_power_of_2(nr_pages)) in perf_mmap() 6397 if (vma_size != PAGE_SIZE * (1 + nr_pages)) in perf_mmap() [all …]
|
/kernel/power/ |
D | snapshot.c | 1555 static unsigned long preallocate_image_pages(unsigned long nr_pages, gfp_t mask) in preallocate_image_pages() argument 1559 while (nr_pages > 0) { in preallocate_image_pages() 1570 nr_pages--; in preallocate_image_pages() 1577 static unsigned long preallocate_image_memory(unsigned long nr_pages, in preallocate_image_memory() argument 1586 if (nr_pages < alloc) in preallocate_image_memory() 1587 alloc = nr_pages; in preallocate_image_memory() 1593 static unsigned long preallocate_image_highmem(unsigned long nr_pages) in preallocate_image_highmem() argument 1595 return preallocate_image_pages(nr_pages, GFP_IMAGE | __GFP_HIGHMEM); in preallocate_image_highmem() 1606 static unsigned long preallocate_highmem_fraction(unsigned long nr_pages, in preallocate_highmem_fraction() argument 1610 unsigned long alloc = __fraction(nr_pages, highmem, total); in preallocate_highmem_fraction() [all …]
|
D | swap.c | 550 int nr_pages; in save_image() local 563 nr_pages = 0; in save_image() 573 if (!(nr_pages % m)) in save_image() 575 nr_pages / m * 10); in save_image() 576 nr_pages++; in save_image() 689 int nr_pages; in save_image_lzo() local 784 nr_pages = 0; in save_image_lzo() 799 if (!(nr_pages % m)) in save_image_lzo() 801 nr_pages / m * 10); in save_image_lzo() 802 nr_pages++; in save_image_lzo() [all …]
|
D | hibernate.c | 255 unsigned nr_pages, char *msg) in swsusp_show_speed() argument 268 k = nr_pages * (PAGE_SIZE / 1024); in swsusp_show_speed()
|
/kernel/bpf/ |
D | ringbuf.c | 38 int nr_pages; member 67 int nr_pages = nr_meta_pages + nr_data_pages; in bpf_ringbuf_area_alloc() local 95 for (i = 0; i < nr_pages; i++) { in bpf_ringbuf_area_alloc() 98 nr_pages = i; in bpf_ringbuf_area_alloc() 111 rb->nr_pages = nr_pages; in bpf_ringbuf_area_alloc() 116 for (i = 0; i < nr_pages; i++) in bpf_ringbuf_area_alloc() 187 int i, nr_pages = rb->nr_pages; in bpf_ringbuf_free() local 190 for (i = 0; i < nr_pages; i++) in bpf_ringbuf_free()
|
/kernel/ |
D | watch_queue.c | 249 int ret, i, nr_pages; in watch_queue_set_size() local 260 nr_pages = (nr_notes + WATCH_QUEUE_NOTES_PER_PAGE - 1); in watch_queue_set_size() 261 nr_pages /= WATCH_QUEUE_NOTES_PER_PAGE; in watch_queue_set_size() 262 user_bufs = account_pipe_buffers(pipe->user, pipe->nr_accounted, nr_pages); in watch_queue_set_size() 264 if (nr_pages > pipe->max_usage && in watch_queue_set_size() 272 nr_notes = nr_pages * WATCH_QUEUE_NOTES_PER_PAGE; in watch_queue_set_size() 278 pages = kcalloc(sizeof(struct page *), nr_pages, GFP_KERNEL); in watch_queue_set_size() 282 for (i = 0; i < nr_pages; i++) { in watch_queue_set_size() 298 wqueue->nr_pages = nr_pages; in watch_queue_set_size() 307 (void) account_pipe_buffers(pipe->user, nr_pages, pipe->nr_accounted); in watch_queue_set_size() [all …]
|
D | relay.c | 1118 unsigned int pidx, poff, total_len, subbuf_pages, nr_pages; in subbuf_splice_actor() local 1131 .nr_pages = 0, in subbuf_splice_actor() 1153 nr_pages = min_t(unsigned int, subbuf_pages, spd.nr_pages_max); in subbuf_splice_actor() 1155 for (total_len = 0; spd.nr_pages < nr_pages; spd.nr_pages++) { in subbuf_splice_actor() 1165 spd.pages[spd.nr_pages] = rbuf->page_array[pidx]; in subbuf_splice_actor() 1166 spd.partial[spd.nr_pages].offset = poff; in subbuf_splice_actor() 1173 spd.partial[spd.nr_pages].len = this_len; in subbuf_splice_actor() 1174 spd.partial[spd.nr_pages].private = private; in subbuf_splice_actor() 1182 spd.nr_pages++; in subbuf_splice_actor() 1188 if (!spd.nr_pages) in subbuf_splice_actor()
|
D | kexec_core.c | 154 unsigned long nr_pages = totalram_pages(); in sanity_check_segment_list() local 220 if (PAGE_COUNT(image->segment[i].memsz) > nr_pages / 2) in sanity_check_segment_list() 226 if (total_pages > nr_pages / 2) in sanity_check_segment_list()
|
D | resource.c | 440 int walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages, in walk_system_ram_range() argument 450 end = ((u64)(start_pfn + nr_pages) << PAGE_SHIFT) - 1; in walk_system_ram_range() 465 static int __is_ram(unsigned long pfn, unsigned long nr_pages, void *arg) in __is_ram() argument
|
D | fork.c | 450 BUG_ON(vm->nr_pages != THREAD_SIZE / PAGE_SIZE); in memcg_charge_kernel_stack() 829 unsigned long nr_pages = totalram_pages(); in set_max_threads() local 835 if (fls64(nr_pages) + fls64(PAGE_SIZE) > 64) in set_max_threads() 838 threads = div64_u64((u64) nr_pages * (u64) PAGE_SIZE, in set_max_threads()
|
/kernel/trace/ |
D | ring_buffer.c | 496 unsigned long nr_pages; member 811 return buffer->buffers[cpu]->nr_pages; in ring_buffer_nr_pages() 848 size_t nr_pages; in full_hit() local 851 nr_pages = cpu_buffer->nr_pages; in full_hit() 852 if (!nr_pages || !full) in full_hit() 862 return (dirty * 100) >= (full * nr_pages); in full_hit() 1552 long nr_pages, struct list_head *pages) in __rb_allocate_pages() argument 1567 if (i < nr_pages) in __rb_allocate_pages() 1588 for (i = 0; i < nr_pages; i++) { in __rb_allocate_pages() 1626 unsigned long nr_pages) in rb_allocate_pages() argument [all …]
|
D | trace.c | 6954 .nr_pages = 0, /* This gets updated below. */ in tracing_splice_read_pipe() 7013 spd.nr_pages = i; in tracing_splice_read_pipe() 8348 spd.nr_pages++; in tracing_buffers_splice_read() 8355 spd.nr_pages = i; in tracing_buffers_splice_read() 8358 if (!spd.nr_pages) { in tracing_buffers_splice_read()
|
/kernel/dma/ |
D | debug.c | 894 int i, nr_pages; in dma_debug_init() local 907 nr_pages = DIV_ROUND_UP(nr_prealloc_entries, DMA_DEBUG_DYNAMIC_ENTRIES); in dma_debug_init() 908 for (i = 0; i < nr_pages; ++i) in dma_debug_init() 1068 for (i = 0; i < stack_vm_area->nr_pages; i++) { in check_for_stack()
|
/kernel/rcu/ |
D | tree.c | 3448 int nr_pages; in fill_page_cache_func() local 3452 nr_pages = atomic_read(&krcp->backoff_page_cache_fill) ? in fill_page_cache_func() 3455 for (i = 0; i < nr_pages; i++) { in fill_page_cache_func()
|