Lines Matching full:lists
10 * The MRU Cache data structure consists of a data store, an array of lists and
16 * The group count controls how many lists are created, and thereby how finely
18 * all the lists whose time has expired are deleted.
22 * five. Five internal lists will be created, each representing a two second
62 * current list. Doubly linked lists are used to make the list maintenance
64 * inserts and lookups can occur when there are no free lists available. When
78 * both the data store and to one of the lists. It must also be possible to
88 * likely result in a loop in one of the lists. That's a sure-fire recipe for
93 struct list_head *lists; /* Array of lists, one per grp. */ member
110 * lists relative to a particular time. In the case of destroying, that time
115 * list again and again until either a) the lists are all empty, or b) time zero
123 * zero if there's no need to schedule more work because the lists are empty.
138 /* While time zero is older than the time spanned by all the lists. */ in _xfs_mru_cache_migrate()
145 lru_list = mru->lists + mru->lru_grp; in _xfs_mru_cache_migrate()
158 * lists have been migrated to the reap list, it's now empty. in _xfs_mru_cache_migrate()
171 lru_list = mru->lists + ((mru->lru_grp + grp) % mru->grp_count); in _xfs_mru_cache_migrate()
177 /* All the lists must be empty. */ in _xfs_mru_cache_migrate()
185 * MRU list. The lists must be migrated first to ensure that they're
215 list_add_tail(&elem->list_node, mru->lists + grp); in _xfs_mru_cache_list_insert()
272 ASSERT(mru && mru->lists); in _xfs_mru_cache_reap()
273 if (!mru || !mru->lists) in _xfs_mru_cache_reap()
341 mru->lists = kmem_zalloc(mru->grp_count * sizeof(*mru->lists), 0); in xfs_mru_cache_create()
343 if (!mru->lists) { in xfs_mru_cache_create()
349 INIT_LIST_HEAD(mru->lists + grp); in xfs_mru_cache_create()
366 if (err && mru && mru->lists) in xfs_mru_cache_create()
367 kmem_free(mru->lists); in xfs_mru_cache_create()
384 if (!mru || !mru->lists) in xfs_mru_cache_flush()
404 if (!mru || !mru->lists) in xfs_mru_cache_destroy()
409 kmem_free(mru->lists); in xfs_mru_cache_destroy()
426 ASSERT(mru && mru->lists); in xfs_mru_cache_insert()
427 if (!mru || !mru->lists) in xfs_mru_cache_insert()
459 ASSERT(mru && mru->lists); in xfs_mru_cache_remove()
460 if (!mru || !mru->lists) in xfs_mru_cache_remove()
515 ASSERT(mru && mru->lists); in xfs_mru_cache_lookup()
516 if (!mru || !mru->lists) in xfs_mru_cache_lookup()