On Wed, 2006-04-19 at 18:11 +0900, MAEDA Naoaki wrote:
> [EMAIL PROTECTED] wrote:
> > 1/6: ckrm_numtasks_init
> >
> > Hooks up with CKRM core by defining the basic alloc/free functions and
> > registering the controller with the core.
> > --
>
> <SNIP>
>
> > +
> > +static struct ckrm_shares *numtasks_alloc_shares_struct(
> > + struct ckrm_class *class)
> > +{
> > + struct ckrm_numtasks *res;
> > +
> > + res = kzalloc(sizeof(struct ckrm_numtasks), GFP_ATOMIC);
>
> Why does it need to allocate a memory in GFP_ATOMIC?
> Are there any reason why this callback cannot sleep?
do_alloc_shares_struct() _was_ calling this with a lock held. I changed
that, but this a remnant of that. will fix.
But this reminds me something, move_task is still called (at
ckrm.c:move_tasks)with a lock (class->class_lock) held, which i do not
like (i do not want to hold any locks/semaphores when crossing
boundaries. Any ideas to get rid of that would help.
>
> > + if (!res)
> > + return NULL;
> > + res->class = class;
> > + numtasks_res_init_one(res);
> > + return &res->shares;
> > +}
>
> Thanks,
> MAEDA Naoaki
>
>
--
----------------------------------------------------------------------
Chandra Seetharaman | Be careful what you choose....
- [EMAIL PROTECTED] | .......you may get it.
----------------------------------------------------------------------
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
ckrm-tech mailing list
https://lists.sourceforge.net/lists/listinfo/ckrm-tech