Home
last modified time | relevance | path

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

12

/mm/
Dcma.c53 return cma->count << PAGE_SHIFT; in cma_get_size()
87 unsigned int count) in cma_clear_bitmap() argument
92 bitmap_count = cma_bitmap_pages_to_bits(cma, count); in cma_clear_bitmap()
103 unsigned i = cma->count >> pageblock_order; in cma_activate_area()
109 cma->count = 0; in cma_activate_area()
146 cma->count = 0; in cma_activate_area()
215 cma->count = size >> PAGE_SHIFT; in cma_init_reserved_mem()
401 pr_cont("=> %lu free of %lu total pages\n", nr_total, cma->count); in cma_debug_show_areas()
417 struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align, in cma_alloc() argument
427 if (!cma || !cma->count) in cma_alloc()
[all …]
Dpage_owner.c263 unsigned long count[MIGRATE_TYPES] = { 0, }; in pagetypeinfo_showmixedcount_print() local
321 count[MIGRATE_MOVABLE]++; in pagetypeinfo_showmixedcount_print()
323 count[pageblock_mt]++; in pagetypeinfo_showmixedcount_print()
335 seq_printf(m, "%12lu ", count[i]); in pagetypeinfo_showmixedcount_print()
340 print_page_owner(char __user *buf, size_t count, unsigned long pfn, in print_page_owner() argument
355 kbuf = kmalloc(count, GFP_KERNEL); in print_page_owner()
359 ret = snprintf(kbuf, count, in print_page_owner()
364 if (ret >= count) in print_page_owner()
370 ret += snprintf(kbuf + ret, count - ret, in print_page_owner()
378 if (ret >= count) in print_page_owner()
[all …]
Dpage_counter.c25 new = atomic_long_sub_return(nr_pages, &counter->count); in page_counter_cancel()
44 new = atomic_long_add_return(nr_pages, &c->count); in page_counter_charge()
85 new = atomic_long_add_return(nr_pages, &c->count); in page_counter_try_charge()
87 atomic_long_sub(nr_pages, &c->count); in page_counter_try_charge()
139 long count; in page_counter_limit() local
152 count = atomic_long_read(&counter->count); in page_counter_limit()
154 if (count > limit) in page_counter_limit()
159 if (atomic_long_read(&counter->count) <= count) in page_counter_limit()
Dcma_debug.c94 static int cma_free_mem(struct cma *cma, int count) in cma_free_mem() argument
98 while (count) { in cma_free_mem()
103 if (mem->n <= count) { in cma_free_mem()
105 count -= mem->n; in cma_free_mem()
108 cma_release(cma, mem->p, count); in cma_free_mem()
109 mem->p += count; in cma_free_mem()
110 mem->n -= count; in cma_free_mem()
111 count = 0; in cma_free_mem()
133 static int cma_alloc_mem(struct cma *cma, int count) in cma_alloc_mem() argument
142 p = cma_alloc(cma, count, 0, GFP_KERNEL); in cma_alloc_mem()
[all …]
Dswapfile.c1115 unsigned char count; in __swap_entry_free() local
1120 count = p->swap_map[offset]; in __swap_entry_free()
1122 has_cache = count & SWAP_HAS_CACHE; in __swap_entry_free()
1123 count &= ~SWAP_HAS_CACHE; in __swap_entry_free()
1128 } else if (count == SWAP_MAP_SHMEM) { in __swap_entry_free()
1133 count = 0; in __swap_entry_free()
1134 } else if ((count & ~COUNT_CONTINUED) <= SWAP_MAP_MAX) { in __swap_entry_free()
1135 if (count == COUNT_CONTINUED) { in __swap_entry_free()
1136 if (swap_count_continued(p, offset, count)) in __swap_entry_free()
1137 count = SWAP_MAP_MAX | COUNT_CONTINUED; in __swap_entry_free()
[all …]
Dvmalloc.c1136 void vm_unmap_ram(const void *mem, unsigned int count) in vm_unmap_ram() argument
1138 unsigned long size = (unsigned long)count << PAGE_SHIFT; in vm_unmap_ram()
1151 if (likely(count <= VMAP_MAX_ALLOC)) { in vm_unmap_ram()
1177 void *vm_map_ram(struct page **pages, unsigned int count, int node, pgprot_t prot) in vm_map_ram() argument
1179 unsigned long size = (unsigned long)count << PAGE_SHIFT; in vm_map_ram()
1183 if (likely(count <= VMAP_MAX_ALLOC)) { in vm_map_ram()
1199 vm_unmap_ram(mem, count); in vm_map_ram()
1643 void *vmap(struct page **pages, unsigned int count, in vmap() argument
1651 if (count > totalram_pages) in vmap()
1654 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.c276 long vread(char *buf, char *addr, unsigned long count) in vread() argument
279 if ((unsigned long) buf + count < count) in vread()
280 count = -(unsigned long) buf; in vread()
282 memcpy(buf, addr, count); in vread()
283 return count; in vread()
286 long vwrite(char *buf, char *addr, unsigned long count) in vwrite() argument
289 if ((unsigned long) addr + count < count) in vwrite()
290 count = -(unsigned long) addr; in vwrite()
292 memcpy(addr, buf, count); in vwrite()
293 return count; in vwrite()
[all …]
Dmaccess.c86 long strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count) in strncpy_from_unsafe() argument
92 if (unlikely(count <= 0)) in strncpy_from_unsafe()
100 } while (dst[-1] && ret == 0 && src - unsafe_addr < count); in strncpy_from_unsafe()
Dquicklist.c92 unsigned long count = 0; in quicklist_total_size() local
99 count += q->nr_pages; in quicklist_total_size()
101 return count; in quicklist_total_size()
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()
Dfadvise.c155 unsigned long count; in SYSCALL_DEFINE4() local
168 count = invalidate_mapping_pages(mapping, in SYSCALL_DEFINE4()
177 if (count < (end_index - start_index + 1)) { in SYSCALL_DEFINE4()
Dworkingset.c386 if (node->count && node->count == node->exceptional) { in workingset_update_node()
485 if (WARN_ON_ONCE(node->count != node->exceptional)) in shadow_lru_isolate()
497 node->count--; in shadow_lru_isolate()
Dhighmem.c217 int count; in map_new_virtual() local
222 count = get_pkmap_entries_count(color); in map_new_virtual()
228 count = get_pkmap_entries_count(color); in map_new_virtual()
232 if (--count) in map_new_virtual()
Dvmstat.c725 !__this_cpu_read(p->pcp.count)) in refresh_cpu_vm_stats()
739 if (__this_cpu_read(p->pcp.count)) { in refresh_cpu_vm_stats()
892 unsigned long count = 0; in sum_zone_node_page_state() local
895 count += zone_page_state(zones + i, item); in sum_zone_node_page_state()
897 return count; in sum_zone_node_page_state()
909 unsigned long count = 0; in sum_zone_numa_state() local
912 count += zone_numa_state_snapshot(zones + i, item); in sum_zone_numa_state()
914 return count; in sum_zone_numa_state()
1346 unsigned long count[MIGRATE_TYPES] = { 0, }; in pagetypeinfo_showblockcount_print() local
1365 count[mtype]++; in pagetypeinfo_showblockcount_print()
[all …]
Dksm.c2778 const char *buf, size_t count) in sleep_millisecs_store() argument
2789 return count; in sleep_millisecs_store()
2801 const char *buf, size_t count) in pages_to_scan_store() argument
2812 return count; in pages_to_scan_store()
2823 const char *buf, size_t count) in run_store() argument
2851 count = err; in run_store()
2860 return count; in run_store()
2873 const char *buf, size_t count) in merge_across_nodes_store() argument
2917 return err ? err : count; in merge_across_nodes_store()
2929 const char *buf, size_t count) in use_zero_pages_store() argument
[all …]
Dpage_alloc.c1120 static void free_pcppages_bulk(struct zone *zone, int count, in free_pcppages_bulk() argument
1130 while (count) { in free_pcppages_bulk()
1150 batch_free = count; in free_pcppages_bulk()
1171 } while (--count && --batch_free && !list_empty(list)); in free_pcppages_bulk()
2337 unsigned long count, struct list_head *list, in rmqueue_bulk() argument
2343 for (i = 0; i < count; ++i) { in rmqueue_bulk()
2398 to_drain = min(pcp->count, batch); in drain_zone_pages()
2401 pcp->count -= to_drain; in drain_zone_pages()
2424 if (pcp->count) { in drain_pages_zone()
2425 free_pcppages_bulk(zone, pcp->count, pcp); in drain_pages_zone()
[all …]
Dkhugepaged.c119 const char *buf, size_t count) in scan_sleep_millisecs_store() argument
132 return count; in scan_sleep_millisecs_store()
147 const char *buf, size_t count) in alloc_sleep_millisecs_store() argument
160 return count; in alloc_sleep_millisecs_store()
174 const char *buf, size_t count) in pages_to_scan_store() argument
185 return count; in pages_to_scan_store()
217 const char *buf, size_t count) in khugepaged_defrag_store() argument
219 return single_hugepage_flag_store(kobj, attr, buf, count, in khugepaged_defrag_store()
242 const char *buf, size_t count) in khugepaged_max_ptes_none_store() argument
253 return count; in khugepaged_max_ptes_none_store()
[all …]
Dbootmem.c173 unsigned long *map, start, end, pages, cur, count = 0; in free_all_bootmem_core() local
212 count += BITS_PER_LONG; in free_all_bootmem_core()
222 count++; in free_all_bootmem_core()
234 count += pages; in free_all_bootmem_core()
239 bdebug("nid=%td released=%lx\n", bdata - bootmem_node_data, count); in free_all_bootmem_core()
241 return count; in free_all_bootmem_core()
Dcma.h7 unsigned long count; member
23 return cma->count >> cma->order_per_bit; in cma_bitmap_maxno()
Dslub.c1454 unsigned long i, count = oo_objects(s->oo); in init_cache_random_seq() local
1460 err = cache_random_seq_create(s, count, GFP_KERNEL); in init_cache_random_seq()
1469 for (i = 0; i < count; i++) in init_cache_random_seq()
4397 unsigned long count = 0; in validate_slab_node() local
4405 count++; in validate_slab_node()
4407 if (count != n->nr_partial) in validate_slab_node()
4409 s->name, count, n->nr_partial); in validate_slab_node()
4416 count++; in validate_slab_node()
4418 if (count != atomic_long_read(&n->nr_slabs)) in validate_slab_node()
4420 s->name, count, atomic_long_read(&n->nr_slabs)); in validate_slab_node()
[all …]
Dmemcontrol.c589 __this_cpu_add(memcg->stat->count[MEMCG_RSS], nr_pages); in mem_cgroup_charge_statistics()
591 __this_cpu_add(memcg->stat->count[MEMCG_CACHE], nr_pages); in mem_cgroup_charge_statistics()
593 __this_cpu_add(memcg->stat->count[NR_SHMEM], nr_pages); in mem_cgroup_charge_statistics()
598 __this_cpu_add(memcg->stat->count[MEMCG_RSS_HUGE], nr_pages); in mem_cgroup_charge_statistics()
1081 unsigned long count; in mem_cgroup_margin() local
1084 count = page_counter_read(&memcg->memory); in mem_cgroup_margin()
1086 if (count < limit) in mem_cgroup_margin()
1087 margin = limit - count; in mem_cgroup_margin()
1090 count = page_counter_read(&memcg->memsw); in mem_cgroup_margin()
1092 if (count <= limit) in mem_cgroup_margin()
[all …]
Dkmemleak.c166 int count; member
337 return object->count != KMEMLEAK_BLACK && in color_white()
338 object->count < object->min_count; in color_white()
344 object->count >= object->min_count; in color_gray()
400 pr_notice(" count = %d\n", object->count); in dump_object_info()
572 object->count = 0; /* white color initially */ in create_object()
1263 object->count++; in update_refs()
1489 object->count = 0; in kmemleak_scan()
1562 object->count = object->min_count; in kmemleak_scan()
Dmlock.c636 unsigned long count = 0; in count_mm_mlocked_page_nr() local
652 count -= (start - vma->vm_start); in count_mm_mlocked_page_nr()
654 count += start + len - vma->vm_start; in count_mm_mlocked_page_nr()
657 count += vma->vm_end - vma->vm_start; in count_mm_mlocked_page_nr()
661 return count >> PAGE_SHIFT; in count_mm_mlocked_page_nr()
Dnobootmem.c132 unsigned long count = 0; in free_low_memory_core_early() local
148 count += __free_memory_core(start, end); in free_low_memory_core_early()
150 return count; in free_low_memory_core_early()

12