/mm/ |
D | cma.c | 51 return cma->count << PAGE_SHIFT; in cma_get_size() 86 unsigned int count) in cma_clear_bitmap() argument 91 bitmap_count = cma_bitmap_pages_to_bits(cma, count); in cma_clear_bitmap() 102 unsigned i = cma->count >> pageblock_order; in cma_activate_area() 108 cma->count = 0; in cma_activate_area() 145 cma->count = 0; in cma_activate_area() 217 cma->count = size >> PAGE_SHIFT; in cma_init_reserved_mem() 402 pr_cont("=> %lu free of %lu total pages\n", nr_total, cma->count); in cma_debug_show_areas() 419 struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align, in cma_alloc() argument 430 if (!cma || !cma->count) in cma_alloc() [all …]
|
D | page_owner.c | 261 unsigned long count[MIGRATE_TYPES] = { 0, }; in pagetypeinfo_showmixedcount_print() local 319 count[MIGRATE_MOVABLE]++; in pagetypeinfo_showmixedcount_print() 321 count[pageblock_mt]++; in pagetypeinfo_showmixedcount_print() 333 seq_printf(m, "%12lu ", count[i]); in pagetypeinfo_showmixedcount_print() 338 print_page_owner(char __user *buf, size_t count, unsigned long pfn, in print_page_owner() argument 347 count = min_t(size_t, count, PAGE_SIZE); in print_page_owner() 348 kbuf = kmalloc(count, GFP_KERNEL); in print_page_owner() 352 ret = snprintf(kbuf, count, in print_page_owner() 357 if (ret >= count) in print_page_owner() 363 ret += snprintf(kbuf + ret, count - ret, in print_page_owner() [all …]
|
D | cma_debug.c | 92 static int cma_free_mem(struct cma *cma, int count) in cma_free_mem() argument 96 while (count) { in cma_free_mem() 101 if (mem->n <= count) { in cma_free_mem() 103 count -= mem->n; in cma_free_mem() 106 cma_release(cma, mem->p, count); in cma_free_mem() 107 mem->p += count; in cma_free_mem() 108 mem->n -= count; in cma_free_mem() 109 count = 0; in cma_free_mem() 131 static int cma_alloc_mem(struct cma *cma, int count) in cma_alloc_mem() argument 140 p = cma_alloc(cma, count, 0, false); in cma_alloc_mem() [all …]
|
D | maccess.c | 161 long strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count) in strncpy_from_unsafe() argument 167 if (unlikely(count <= 0)) in strncpy_from_unsafe() 175 } while (dst[-1] && ret == 0 && src - unsafe_addr < count); in strncpy_from_unsafe() 203 long count) in strncpy_from_unsafe_user() argument 208 if (unlikely(count <= 0)) in strncpy_from_unsafe_user() 213 ret = strncpy_from_user(dst, unsafe_addr, count); in strncpy_from_unsafe_user() 217 if (ret >= count) { in strncpy_from_unsafe_user() 218 ret = count; in strncpy_from_unsafe_user() 243 long strnlen_unsafe_user(const void __user *unsafe_addr, long count) in strnlen_unsafe_user() argument 250 ret = strnlen_user(unsafe_addr, count); in strnlen_unsafe_user()
|
D | swapfile.c | 1181 unsigned char count; in __swap_entry_free_locked() local 1184 count = p->swap_map[offset]; in __swap_entry_free_locked() 1186 has_cache = count & SWAP_HAS_CACHE; in __swap_entry_free_locked() 1187 count &= ~SWAP_HAS_CACHE; in __swap_entry_free_locked() 1192 } else if (count == SWAP_MAP_SHMEM) { in __swap_entry_free_locked() 1197 count = 0; in __swap_entry_free_locked() 1198 } else if ((count & ~COUNT_CONTINUED) <= SWAP_MAP_MAX) { in __swap_entry_free_locked() 1199 if (count == COUNT_CONTINUED) { in __swap_entry_free_locked() 1200 if (swap_count_continued(p, offset, count)) in __swap_entry_free_locked() 1201 count = SWAP_MAP_MAX | COUNT_CONTINUED; in __swap_entry_free_locked() [all …]
|
D | filemap.c | 2031 last_index = (*ppos + iter->count + PAGE_SIZE-1) >> PAGE_SHIFT; in generic_file_buffered_read() 2092 offset, iter->count)) in generic_file_buffered_read() 2276 size_t count = iov_iter_count(iter); in generic_file_read_iter() local 2279 if (!count) in generic_file_read_iter() 2291 iocb->ki_pos + count - 1)) in generic_file_read_iter() 2296 iocb->ki_pos + count - 1); in generic_file_read_iter() 2306 count -= retval; in generic_file_read_iter() 2308 iov_iter_revert(iter, count - iov_iter_count(iter)); in generic_file_read_iter() 2319 if (retval < 0 || !count || iocb->ki_pos >= size || in generic_file_read_iter() 2906 loff_t *count) in generic_write_check_limits() argument [all …]
|
D | vmalloc.c | 1736 void vm_unmap_ram(const void *mem, unsigned int count) in vm_unmap_ram() argument 1738 unsigned long size = (unsigned long)count << PAGE_SHIFT; in vm_unmap_ram() 1748 if (likely(count <= VMAP_MAX_ALLOC)) { in vm_unmap_ram() 1777 void *vm_map_ram(struct page **pages, unsigned int count, int node, pgprot_t prot) in vm_map_ram() argument 1779 unsigned long size = (unsigned long)count << PAGE_SHIFT; in vm_map_ram() 1783 if (likely(count <= VMAP_MAX_ALLOC)) { in vm_map_ram() 1799 vm_unmap_ram(mem, count); in vm_map_ram() 2369 void *vmap(struct page **pages, unsigned int count, in vmap() argument 2377 if (count > totalram_pages()) in vmap() 2380 size = (unsigned long)count << PAGE_SHIFT; in vmap() [all …]
|
D | page_idle.c | 123 loff_t pos, size_t count) in page_idle_bitmap_read() argument 130 if (pos % BITMAP_CHUNK_SIZE || count % BITMAP_CHUNK_SIZE) in page_idle_bitmap_read() 137 end_pfn = pfn + count * BITS_PER_BYTE; in page_idle_bitmap_read() 168 loff_t pos, size_t count) in page_idle_bitmap_write() argument 175 if (pos % BITMAP_CHUNK_SIZE || count % BITMAP_CHUNK_SIZE) in page_idle_bitmap_write() 182 end_pfn = pfn + count * BITS_PER_BYTE; in page_idle_bitmap_write()
|
D | nommu.c | 189 long vread(char *buf, char *addr, unsigned long count) in vread() argument 192 if ((unsigned long) buf + count < count) in vread() 193 count = -(unsigned long) buf; in vread() 195 memcpy(buf, addr, count); in vread() 196 return count; in vread() 199 long vwrite(char *buf, char *addr, unsigned long count) in vwrite() argument 202 if ((unsigned long) addr + count < count) in vwrite() 203 count = -(unsigned long) addr; in vwrite() 205 memcpy(addr, buf, count); in vwrite() 206 return count; in vwrite() [all …]
|
D | khugepaged.c | 126 const char *buf, size_t count) in scan_sleep_millisecs_store() argument 139 return count; in scan_sleep_millisecs_store() 154 const char *buf, size_t count) in alloc_sleep_millisecs_store() argument 167 return count; in alloc_sleep_millisecs_store() 181 const char *buf, size_t count) in pages_to_scan_store() argument 192 return count; in pages_to_scan_store() 224 const char *buf, size_t count) in khugepaged_defrag_store() argument 226 return single_hugepage_flag_store(kobj, attr, buf, count, in khugepaged_defrag_store() 249 const char *buf, size_t count) in khugepaged_max_ptes_none_store() argument 260 return count; in khugepaged_max_ptes_none_store() [all …]
|
D | early_ioremap.c | 89 int count = 0; in check_early_ioremap_leak() local 94 count++; in check_early_ioremap_leak() 96 if (WARN(count, KERN_WARNING in check_early_ioremap_leak() 99 count)) in check_early_ioremap_leak()
|
D | highmem.c | 216 int count; in map_new_virtual() local 221 count = get_pkmap_entries_count(color); in map_new_virtual() 227 count = get_pkmap_entries_count(color); in map_new_virtual() 231 if (--count) in map_new_virtual()
|
D | fadvise.c | 146 unsigned long count; in generic_fadvise() local 159 count = invalidate_mapping_pages(mapping, in generic_fadvise() 168 if (count < (end_index - start_index + 1)) { in generic_fadvise()
|
D | huge_memory.c | 176 const char *buf, size_t count) in enabled_store() argument 178 ssize_t ret = count; in enabled_store() 181 min(sizeof("always")-1, count))) { in enabled_store() 185 min(sizeof("madvise")-1, count))) { in enabled_store() 189 min(sizeof("never")-1, count))) { in enabled_store() 215 const char *buf, size_t count, in single_hugepage_flag_store() argument 232 return count; in single_hugepage_flag_store() 251 const char *buf, size_t count) in defrag_store() argument 254 min(sizeof("always")-1, count))) { in defrag_store() 260 min(sizeof("defer+madvise")-1, count))) { in defrag_store() [all …]
|
D | ksm.c | 2853 const char *buf, size_t count) in sleep_millisecs_store() argument 2865 return count; in sleep_millisecs_store() 2877 const char *buf, size_t count) in pages_to_scan_store() argument 2888 return count; in pages_to_scan_store() 2899 const char *buf, size_t count) in run_store() argument 2927 count = err; in run_store() 2936 return count; in run_store() 2949 const char *buf, size_t count) in merge_across_nodes_store() argument 2993 return err ? err : count; in merge_across_nodes_store() 3005 const char *buf, size_t count) in use_zero_pages_store() argument [all …]
|
D | vmstat.c | 797 !__this_cpu_read(p->pcp.count)) in refresh_cpu_vm_stats() 811 if (__this_cpu_read(p->pcp.count)) { in refresh_cpu_vm_stats() 964 unsigned long count = 0; in sum_zone_node_page_state() local 967 count += zone_page_state(zones + i, item); in sum_zone_node_page_state() 969 return count; in sum_zone_node_page_state() 981 unsigned long count = 0; in sum_zone_numa_state() local 984 count += zone_numa_state_snapshot(zones + i, item); in sum_zone_numa_state() 986 return count; in sum_zone_numa_state() 1441 unsigned long count[MIGRATE_TYPES] = { 0, }; in pagetypeinfo_showblockcount_print() local 1460 count[mtype]++; in pagetypeinfo_showblockcount_print() [all …]
|
D | cma.h | 7 unsigned long count; member 23 return cma->count >> cma->order_per_bit; in cma_bitmap_maxno()
|
D | hugetlb.c | 79 bool free = (spool->count == 0) && (spool->used_hpages == 0); in unlock_or_release_subpool() 104 spool->count = 1; in hugepage_new_subpool() 121 BUG_ON(!spool->count); in hugepage_put_subpool() 122 spool->count--; in hugepage_put_subpool() 2361 static void try_to_free_low(struct hstate *h, unsigned long count, in try_to_free_low() argument 2373 if (count >= h->nr_huge_pages) in try_to_free_low() 2385 static inline void try_to_free_low(struct hstate *h, unsigned long count, in try_to_free_low() argument 2424 static int set_max_huge_pages(struct hstate *h, unsigned long count, int nid, in set_max_huge_pages() argument 2449 unsigned long old_count = count; in set_max_huge_pages() 2451 count += h->nr_huge_pages - h->nr_huge_pages_node[nid]; in set_max_huge_pages() [all …]
|
D | slub.c | 1511 unsigned int count = oo_objects(s->oo); in init_cache_random_seq() local 1518 err = cache_random_seq_create(s, count, GFP_KERNEL); in init_cache_random_seq() 1529 for (i = 0; i < count; i++) in init_cache_random_seq() 4424 unsigned long count = 0; in validate_slab_node() local 4432 count++; in validate_slab_node() 4434 if (count != n->nr_partial) in validate_slab_node() 4436 s->name, count, n->nr_partial); in validate_slab_node() 4443 count++; in validate_slab_node() 4445 if (count != atomic_long_read(&n->nr_slabs)) in validate_slab_node() 4447 s->name, count, atomic_long_read(&n->nr_slabs)); in validate_slab_node() [all …]
|
D | kmemleak.c | 153 int count; member 308 return object->count != KMEMLEAK_BLACK && in color_white() 309 object->count < object->min_count; in color_white() 315 object->count >= object->min_count; in color_gray() 366 pr_notice(" count = %d\n", object->count); in dump_object_info() 595 object->count = 0; /* white color initially */ in create_object() 1194 object->count++; in update_refs() 1423 object->count = 0; in kmemleak_scan() 1499 object->count = object->min_count; in kmemleak_scan()
|
D | readahead.c | 578 ssize_t ksys_readahead(int fd, loff_t offset, size_t count) in ksys_readahead() argument 598 ret = vfs_fadvise(f.file, offset, count, POSIX_FADV_WILLNEED); in ksys_readahead() 604 SYSCALL_DEFINE3(readahead, int, fd, loff_t, offset, size_t, count) in SYSCALL_DEFINE3() argument 606 return ksys_readahead(fd, offset, count); in SYSCALL_DEFINE3()
|
D | mlock.c | 643 unsigned long count = 0; in count_mm_mlocked_page_nr() local 659 count -= (start - vma->vm_start); in count_mm_mlocked_page_nr() 661 count += start + len - vma->vm_start; in count_mm_mlocked_page_nr() 664 count += vma->vm_end - vma->vm_start; in count_mm_mlocked_page_nr() 668 return count >> PAGE_SHIFT; in count_mm_mlocked_page_nr()
|
D | workingset.c | 380 if (node->count && node->count == node->nr_values) { in workingset_update_node() 492 if (WARN_ON_ONCE(node->count != node->nr_values)) in shadow_lru_isolate()
|
D | page_alloc.c | 1261 static void free_pcppages_bulk(struct zone *zone, int count, in free_pcppages_bulk() argument 1271 while (count) { in free_pcppages_bulk() 1290 batch_free = count; in free_pcppages_bulk() 1296 pcp->count--; in free_pcppages_bulk() 1314 } while (--count && --batch_free && !list_empty(list)); in free_pcppages_bulk() 2747 unsigned long count, struct list_head *list, in rmqueue_bulk() argument 2753 for (i = 0; i < count; ++i) { in rmqueue_bulk() 2806 to_drain = min(pcp->count, batch); in drain_zone_pages() 2830 if (pcp->count) in drain_pages_zone() 2831 free_pcppages_bulk(zone, pcp->count, pcp); in drain_pages_zone() [all …]
|
D | slab.c | 2380 unsigned int count; member 2391 unsigned int count) in freelist_state_initialize() argument 2405 state->count = count; in freelist_state_initialize() 2406 state->pos = rand % count; in freelist_state_initialize() 2415 if (state->pos >= state->count) in next_random_slot() 2433 unsigned int objfreelist = 0, i, rand, count = cachep->num; in shuffle_freelist() local 2437 if (count < 2) in shuffle_freelist() 2440 precomputed = freelist_state_initialize(&state, cachep, count); in shuffle_freelist() 2445 objfreelist = count - 1; in shuffle_freelist() 2450 count--; in shuffle_freelist() [all …]
|