Lines Matching defs:pool
111 [SC_KERNEL] = { .size = SCS_POOL_0, /* even divide, pool 0 */
115 [SC_USER] = { .size = SCS_POOL_0, /* even divide, pool 0 */
122 /* send context memory pool configuration */
128 /* default memory pool configuration: 100% in pool 0 */
131 { 10000, -1 }, /* pool 0 */
132 { 0, -1 }, /* pool 1 */
135 /* memory pool information, used when calculating final sizes */
141 int count; /* count of contexts in the pool */
142 int blocks; /* block size of the pool */
147 * Convert a pool wildcard to a valid pool index. The wildcards
153 * Return -1 on non-wildcard input, otherwise convert to a pool number.
177 * Read the send context memory pool configuration and send context
212 * - copy the centipercents/absolute sizes from the pool config
234 "Send context memory pool %d: both the block count and centipercent are invalid\n",
255 "Send context memory pool centipercent is %d, expecting 10000\n",
260 /* the absolute pool total cannot be more than the mem total */
264 "Send context memory pool absolute block count %d is larger than the memory size %d\n",
273 * - add up non-memory pool block sizes
274 * - add up memory pool user counts
280 int pool;
307 * Sanity check pool: The conversion will return a pool
312 pool = wildcard_to_pool(size);
313 if (pool == -1) { /* non-wildcard */
315 } else if (pool < NUM_SC_POOLS) { /* valid wildcard */
316 mem_pool_info[pool].count += count;
320 "%s send context invalid pool wildcard %d\n",
336 /* step 3: calculate the blocks in the pools, and pool context sizes */
341 "Send context fixed pool sizes, %u, larger than pool block count %u\n",
345 /* subtract off the fixed pool blocks */
358 "Send context memory pool %d has %u contexts, but no blocks\n",
367 "Send context memory pool %d has %u blocks, but zero contexts\n",
375 /* step 4: fill in the context type sizes from the pool sizes */
379 unsigned pool = wildcard_to_pool(dd->sc_sizes[i].size);
381 WARN_ON_ONCE(pool >= NUM_SC_POOLS);
382 dd->sc_sizes[i].size = mem_pool_info[pool].size;