Re: [RFC PATCH] mm, slab: Reduce space complexity of alien_cache using rbtree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux