Home
last modified time | relevance | path

Searched refs:count (Results 1 – 25 of 39) sorted by relevance

12

/mm/
Dcma.c51 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()
101 unsigned i = cma->count >> pageblock_order; in cma_activate_area()
141 cma->count = 0; in cma_activate_area()
210 cma->count = size >> PAGE_SHIFT; in cma_init_reserved_mem()
395 pr_cont("=> %lu free of %lu total pages\n", nr_total, cma->count); in cma_debug_show_areas()
412 struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align, in cma_alloc() argument
423 if (!cma || !cma->count) in cma_alloc()
427 count, align); in cma_alloc()
[all …]
Dpage_owner.c261 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 …]
Dcma_debug.c92 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 …]
Dmaccess.c161 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()
Dswapfile.c1196 unsigned char count; in __swap_entry_free_locked() local
1199 count = p->swap_map[offset]; in __swap_entry_free_locked()
1201 has_cache = count & SWAP_HAS_CACHE; in __swap_entry_free_locked()
1202 count &= ~SWAP_HAS_CACHE; in __swap_entry_free_locked()
1207 } else if (count == SWAP_MAP_SHMEM) { in __swap_entry_free_locked()
1212 count = 0; in __swap_entry_free_locked()
1213 } else if ((count & ~COUNT_CONTINUED) <= SWAP_MAP_MAX) { in __swap_entry_free_locked()
1214 if (count == COUNT_CONTINUED) { in __swap_entry_free_locked()
1215 if (swap_count_continued(p, offset, count)) in __swap_entry_free_locked()
1216 count = SWAP_MAP_MAX | COUNT_CONTINUED; in __swap_entry_free_locked()
[all …]
Dfilemap.c2189 last_index = (*ppos + iter->count + PAGE_SIZE-1) >> PAGE_SHIFT; in generic_file_buffered_read()
2250 offset, iter->count)) in generic_file_buffered_read()
2434 size_t count = iov_iter_count(iter); in generic_file_read_iter() local
2437 if (!count) in generic_file_read_iter()
2449 iocb->ki_pos + count - 1)) in generic_file_read_iter()
2454 iocb->ki_pos + count - 1); in generic_file_read_iter()
2464 count -= retval; in generic_file_read_iter()
2466 iov_iter_revert(iter, count - iov_iter_count(iter)); in generic_file_read_iter()
2477 if (retval < 0 || !count || iocb->ki_pos >= size || in generic_file_read_iter()
3072 loff_t *count) in generic_write_check_limits() argument
[all …]
Dvmalloc.c1739 void vm_unmap_ram(const void *mem, unsigned int count) in vm_unmap_ram() argument
1741 unsigned long size = (unsigned long)count << PAGE_SHIFT; in vm_unmap_ram()
1751 if (likely(count <= VMAP_MAX_ALLOC)) { in vm_unmap_ram()
1780 void *vm_map_ram(struct page **pages, unsigned int count, int node, pgprot_t prot) in vm_map_ram() argument
1782 unsigned long size = (unsigned long)count << PAGE_SHIFT; in vm_map_ram()
1786 if (likely(count <= VMAP_MAX_ALLOC)) { in vm_map_ram()
1802 vm_unmap_ram(mem, count); in vm_map_ram()
2372 void *vmap(struct page **pages, unsigned int count, in vmap() argument
2380 if (count > totalram_pages()) in vmap()
2383 size = (unsigned long)count << PAGE_SHIFT; in vmap()
[all …]
Dpage_idle.c123 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()
Dnommu.c189 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 …]
Dkhugepaged.c129 const char *buf, size_t count) in scan_sleep_millisecs_store() argument
142 return count; in scan_sleep_millisecs_store()
157 const char *buf, size_t count) in alloc_sleep_millisecs_store() argument
170 return count; in alloc_sleep_millisecs_store()
184 const char *buf, size_t count) in pages_to_scan_store() argument
195 return count; in pages_to_scan_store()
227 const char *buf, size_t count) in khugepaged_defrag_store() argument
229 return single_hugepage_flag_store(kobj, attr, buf, count, in khugepaged_defrag_store()
252 const char *buf, size_t count) in khugepaged_max_ptes_none_store() argument
263 return count; in khugepaged_max_ptes_none_store()
[all …]
Dearly_ioremap.c89 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()
Dhighmem.c216 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()
Dvmstat.c797 !__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
1456 count[mtype]++; in pagetypeinfo_showblockcount_print()
[all …]
Dfadvise.c146 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()
Dksm.c2843 const char *buf, size_t count) in sleep_millisecs_store() argument
2855 return count; in sleep_millisecs_store()
2867 const char *buf, size_t count) in pages_to_scan_store() argument
2878 return count; in pages_to_scan_store()
2889 const char *buf, size_t count) in run_store() argument
2917 count = err; in run_store()
2926 return count; in run_store()
2939 const char *buf, size_t count) in merge_across_nodes_store() argument
2983 return err ? err : count; in merge_across_nodes_store()
2995 const char *buf, size_t count) in use_zero_pages_store() argument
[all …]
Dcma.h7 unsigned long count; member
23 return cma->count >> cma->order_per_bit; in cma_bitmap_maxno()
Dhugetlb.c94 bool free = (spool->count == 0) && (spool->used_hpages == 0); in unlock_or_release_subpool()
119 spool->count = 1; in hugepage_new_subpool()
136 BUG_ON(!spool->count); in hugepage_put_subpool()
137 spool->count--; in hugepage_put_subpool()
2405 static void try_to_free_low(struct hstate *h, unsigned long count, in try_to_free_low() argument
2417 if (count >= h->nr_huge_pages) in try_to_free_low()
2429 static inline void try_to_free_low(struct hstate *h, unsigned long count, in try_to_free_low() argument
2468 static int set_max_huge_pages(struct hstate *h, unsigned long count, int nid, in set_max_huge_pages() argument
2493 unsigned long old_count = count; in set_max_huge_pages()
2495 count += h->nr_huge_pages - h->nr_huge_pages_node[nid]; in set_max_huge_pages()
[all …]
Dslub.c1548 unsigned int count = oo_objects(s->oo); in init_cache_random_seq() local
1555 err = cache_random_seq_create(s, count, GFP_KERNEL); in init_cache_random_seq()
1566 for (i = 0; i < count; i++) in init_cache_random_seq()
4497 unsigned long count = 0; in validate_slab_node() local
4505 count++; in validate_slab_node()
4507 if (count != n->nr_partial) in validate_slab_node()
4509 s->name, count, n->nr_partial); in validate_slab_node()
4516 count++; in validate_slab_node()
4518 if (count != atomic_long_read(&n->nr_slabs)) in validate_slab_node()
4520 s->name, count, atomic_long_read(&n->nr_slabs)); in validate_slab_node()
[all …]
Dkmemleak.c153 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()
1199 object->count++; in update_refs()
1429 object->count = 0; in kmemleak_scan()
1505 object->count = object->min_count; in kmemleak_scan()
Dpage_alloc.c1262 static void free_pcppages_bulk(struct zone *zone, int count, in free_pcppages_bulk() argument
1276 count = min(pcp->count, count); in free_pcppages_bulk()
1277 while (count) { in free_pcppages_bulk()
1296 batch_free = count; in free_pcppages_bulk()
1302 pcp->count--; in free_pcppages_bulk()
1320 } while (--count && --batch_free && !list_empty(list)); in free_pcppages_bulk()
2776 unsigned long count, struct list_head *list, in rmqueue_bulk() argument
2782 for (i = 0; i < count; ++i) { in rmqueue_bulk()
2842 pcp->count += rmqueue_bulk(zone, order, in get_populated_pcp_list()
2868 to_drain = min(pcp->count, batch); in drain_zone_pages()
[all …]
Dreadahead.c578 ssize_t ksys_readahead(int fd, loff_t offset, size_t count) in ksys_readahead() argument
599 ret = vfs_fadvise(f.file, offset, count, POSIX_FADV_WILLNEED); in ksys_readahead()
605 SYSCALL_DEFINE3(readahead, int, fd, loff_t, offset, size_t, count) in SYSCALL_DEFINE3() argument
607 return ksys_readahead(fd, offset, count); in SYSCALL_DEFINE3()
Dmlock.c643 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()
Dworkingset.c380 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()
Dslab.c2380 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 …]
Dbacking-dev.c137 const char *buf, size_t count) in read_ahead_kb_store() argument
149 return count; in read_ahead_kb_store()
167 struct device_attribute *attr, const char *buf, size_t count) in min_ratio_store() argument
179 ret = count; in min_ratio_store()
186 struct device_attribute *attr, const char *buf, size_t count) in max_ratio_store() argument
198 ret = count; in max_ratio_store()

12