Lines Matching full:array
22 * array of the size of a memory page. It stores 512 u64's with the following
34 * and thus iterating over the array initially won't kick out those elements
38 * elements entered into the array, during which, we're decaying all elements.
68 * elements have stayed in the array without having been accessed again.
95 u64 *array; /* container page */ member
96 unsigned int n; /* number of elements in the array */
140 * element in the array. On insertion and any access, it gets reset to max.
147 u8 decay = DECAY(ca->array[i]); in do_spring_cleaning()
154 ca->array[i] &= ~(DECAY_MASK << COUNT_BITS); in do_spring_cleaning()
155 ca->array[i] |= (decay << COUNT_BITS); in do_spring_cleaning()
194 this_pfn = PFN(ca->array[i]); in __find_elem()
238 memmove((void *)&ca->array[idx], in del_elem()
239 (void *)&ca->array[idx + 1], in del_elem()
251 unsigned int this = FULL_COUNT(ca->array[i]); in del_lru_elem_unlocked()
261 return PFN(ca->array[min_idx]); in del_lru_elem_unlocked()
290 u64 this = PFN(ca->array[i]); in sanity_check()
303 u64 this = PFN(ca->array[i]); in sanity_check()
305 pr_info(" %03d: [%016llx|%03llx]\n", i, this, FULL_COUNT(ca->array[i])); in sanity_check()
313 * cec_add_elem - Add an element to the CEC array.
331 if (!ce_arr.array || ce_arr.disabled) in cec_add_elem()
338 /* Array full, free the LRU slot. */ in cec_add_elem()
347 memmove((void *)&ca->array[to + 1], in cec_add_elem()
348 (void *)&ca->array[to], in cec_add_elem()
351 ca->array[to] = pfn << PAGE_SHIFT; in cec_add_elem()
356 ca->array[to] |= DECAY_MASK << COUNT_BITS; in cec_add_elem()
357 ca->array[to]++; in cec_add_elem()
360 count = COUNT(ca->array[to]); in cec_add_elem()
362 u64 pfn = ca->array[to] >> PAGE_SHIFT; in cec_add_elem()
456 u64 this = PFN(ca->array[i]); in array_show()
459 i, this, bins[DECAY(ca->array[i])], COUNT(ca->array[i])); in array_show()
479 DEFINE_SHOW_ATTRIBUTE(array);
483 struct dentry *d, *pfn, *decay, *count, *array; in create_debugfs_nodes() local
514 array = debugfs_create_file("array", S_IRUSR, d, NULL, &array_fops); in create_debugfs_nodes()
515 if (!array) { in create_debugfs_nodes()
516 pr_warn("Error creating array debugfs node!\n"); in create_debugfs_nodes()
567 ce_arr.array = (void *)get_zeroed_page(GFP_KERNEL); in cec_init()
568 if (!ce_arr.array) { in cec_init()
569 pr_err("Error allocating CE array page!\n"); in cec_init()
574 free_page((unsigned long)ce_arr.array); in cec_init()