lkml.org 
[lkml]   [2021]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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?

\
 
 \ /
  Last update: 2021-10-04 07:39    [W:0.058 / U:4.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site