lkml.org 
[lkml]   [2012]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] genalloc: make possible to use a custom allocation algorithm
From
In my mind 'data' is for custom algorithms that could need additional
data to perform the allocation (it is very similar to what is done in
gen_pool_for_each_chunk function).

In gen_pool_set_algo function I have test 'algo' just be sure that we
alway have a valid algorithm function.
gen_pool_alloc doesn't take pool->lock, only rcu_lock, and I want to
avoid changing allocation function while gen_pool_alloc use it, so I
have only protect pool->algo with rcu_lock.
I need to export gen_pool_best_fit so I have do the same for gen_pool_first_fit.

I will add more detail about that in kerneldoc and fix the other
mistakes before send a new version of this patch.

Regards,
Benjamin Gaignard


\
 
 \ /
  Last update: 2012-09-10 10:41    [W:0.349 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site