Home | History | Annotate | Download | only in uvm

Lines Matching defs:elt

82 /* Given an ELT and a page index, find the swap slot. */
83 #define UAO_SWHASH_ELT_PAGESLOT(elt, idx) \
84 ((elt)->slots[UAO_SWHASH_ELT_PAGESLOT_IDX(idx)])
86 /* Given an ELT, return its pageidx base. */
87 #define UAO_SWHASH_ELT_PAGEIDX_BASE(ELT) \
88 ((elt)->tag << UAO_SWHASH_CLUSTER_SHIFT)
207 struct uao_swhash_elt *elt;
217 LIST_FOREACH(elt, swhash, list) {
218 if (elt->tag == page_tag) {
219 return elt;
230 elt = pool_get(&uao_swhash_elt_pool, PR_NOWAIT);
231 if (elt == NULL) {
234 LIST_INSERT_HEAD(swhash, elt, list);
235 elt->tag = page_tag;
236 elt->count = 0;
237 memset(elt->slots, 0, sizeof(elt->slots));
238 return elt;
251 struct uao_swhash_elt *elt;
267 elt = uao_find_swhash_elt(aobj, pageidx, false);
268 return elt ? UAO_SWHASH_ELT_PAGESLOT(elt, pageidx) : 0;
291 struct uao_swhash_elt *elt;
321 elt = uao_find_swhash_elt(aobj, pageidx, slot != 0);
322 if (elt == NULL) {
326 oldslot = UAO_SWHASH_ELT_PAGESLOT(elt, pageidx);
327 UAO_SWHASH_ELT_PAGESLOT(elt, pageidx) = slot;
330 * now adjust the elt's reference counter and free it if we've
336 elt->count++;
339 elt->count--;
341 if (elt->count == 0) {
342 LIST_REMOVE(elt, list);
343 pool_put(&uao_swhash_elt_pool, elt);
1168 struct uao_swhash_elt *elt;
1173 for (elt = LIST_FIRST(&aobj->u_swhash[buck]);
1174 elt != NULL;
1175 elt = LIST_NEXT(elt, list)) {
1179 int slot = elt->slots[i];
1193 * since the swhash elt
1198 UAO_SWHASH_ELT_PAGEIDX_BASE(elt) + i);
1329 struct uao_swhash_elt *elt, *next;
1331 for (elt = LIST_FIRST(&aobj->u_swhash[i]);
1332 elt != NULL;
1333 elt = next) {
1337 next = LIST_NEXT(elt, list);
1339 if (elt->tag < taglo || taghi < elt->tag) {
1343 if (elt->tag == taglo) {
1350 if (elt->tag == taghi) {
1358 int slot = elt->slots[j];
1361 (UAO_SWHASH_ELT_PAGEIDX_BASE(elt)
1366 KASSERT(elt->count > 0);
1367 elt->slots[j] = 0;
1368 elt->count--;
1372 if (elt->count == 0) {
1373 LIST_REMOVE(elt, list);
1374 pool_put(&uao_swhash_elt_pool, elt);