Lines Matching refs:state
2382 * Initialize the state based on the randomization methode available.
2385 static bool freelist_state_initialize(union freelist_init_state *state,
2395 /* Use a random state if the pre-computed list is not available */
2397 prandom_seed_state(&state->rnd_state, rand);
2400 state->list = cachep->random_seq;
2401 state->count = count;
2402 state->pos = rand % count;
2409 static freelist_idx_t next_random_slot(union freelist_init_state *state)
2411 if (state->pos >= state->count)
2412 state->pos = 0;
2413 return state->list[state->pos++];
2424 * Shuffle the freelist initialization state based on pre-computed lists.
2430 union freelist_init_state state;
2436 precomputed = freelist_state_initialize(&state, cachep, count);
2443 objfreelist = next_random_slot(&state);
2459 rand = prandom_u32_state(&state.rnd_state);
2465 set_free_obj(page, i, next_random_slot(&state));
3412 * Release an obj back to its cache. If the obj has a constructed state, it must
3413 * be in this state _before_ it is released. Called with disabled ints.