Messages in this thread | | | Date | Mon, 4 Oct 2021 05:38:02 +0000 | From | Hyeonggon Yoo <> | Subject | Re: [RFC PATCH] mm, slab: Reduce space complexity of alien_cache using rbtree |
| |
On Sun, Oct 03, 2021 at 05:17:50AM +0000, Hyeonggon Yoo wrote: > + for (i = 0; i < alc_ptr->capacity; i++) { > + alc_ptr->pool[i] = kmalloc_node(sizeof(struct alien_object), gfp, node); > + if (!alc_ptr->pool) {
There is mistake - the condition is (!alc_ptr->pool[i]).
> + for (i = i - 1; i >= 0; i--) > + kfree(alc_ptr->pool[i]); > + kfree(alc_ptr->pool); > kfree(alc_ptr); > return NULL; > } > }
Anyway, I want to hear other's opinions. Is this trade-off sounds affordable to you?
| |