unsigned int tail;
unsigned int alloc_count;
int active_elements;
+ unsigned int wrap_to_end; /* Count of allocations that filled to end */
+ unsigned int wrap_around; /* Count of allocations that wrapped around */
};
int cephsan_pagefrag_init(struct cephsan_pagefrag *pf);
ctx->pf.active_elements, ctx->pf.alloc_count);
pr_err(" entry poison: %llx, len: %u\n",
entry->debug_poison, entry->len);
+ pr_err(" wrap_to_end: %u, wrap_around: %u\n",
+ ctx->pf.wrap_to_end, ctx->pf.wrap_around);
BUG();
}
cephsan_pagefrag_free(&ctx->pf, entry->len);
pf->tail = 0;
pf->active_elements = 0;
pf->alloc_count = 0;
+ pf->wrap_to_end = 0;
+ pf->wrap_around = 0;
return 0;
}
EXPORT_SYMBOL(cephsan_pagefrag_init);
pf->tail = 0;
pf->active_elements = 0;
pf->alloc_count = 0;
+ pf->wrap_to_end = 0;
+ pf->wrap_around = 0;
return 0;
}
EXPORT_SYMBOL(cephsan_pagefrag_init_with_buffer);
if (unlikely(delta < 64)) {
n += delta;
pf->head = 0;
+ pf->wrap_to_end++;
return ((u64)n << 32) | prev_head;
}
pf->head += n;
pf->head = n;
pf->alloc_count++;
pf->active_elements++;
+ pf->wrap_around++;
return ((u64)(delta + n) << 32) | prev_head;
} else {
return 0;
pf->tail = 0;
pf->alloc_count = 0;
pf->active_elements = 0;
+ pf->wrap_to_end = 0;
+ pf->wrap_around = 0;
spin_unlock(&pf->lock);
}
EXPORT_SYMBOL(cephsan_pagefrag_reset);