On Fri, 2005-09-16 at 11:14 +0900, MAEDA Naoaki wrote:
> >>>+ * RESOURCE CONTROLLERS
> >>>+ */
> >>>+/* resource controller callback structure */
> >>>+struct ckrm_res_ctlr {
> >>>+ char res_name[CKRM_MAX_RES_NAME];
> >>>+ int res_hdepth; /* maximum hierarchy */
> >>
> >>Nobody seems to care the res_hdepth member. Why?
> >
> >
> > I don't understand what do you mean here. By nobody, you mean resource
> > controllers ? If so, memory controller uses it.
>
> Let me explain. This member seems to hold a maximum hierarchy depth
> a resource controller supports. I imagine that ckrm core take care of
> the number in order not to exceed the hierarchy depth limit somehow,
> but I do not see any code using res_hdepth in the f0 patches.
>
> Probably I misunderstood the purpose of res_hdepth. Could you explain
> that?
Oh... I see what you are saying. it is a left over field.. and you are
right, it is not used (as intended).
But this may be good time to get your/others feedback on this feature.
Originally, we wanted to use this field as you explained, i.e every
controller would set this field to be the maximum depth that it would
support, and the core module would fail the creation of classes deeper
than that level.
But, this would give more control to the controller than the core(i.e
any controller can limit the depth of what CKRM can provide). Even a
wrongly (by misunderstanding by the controller writer or a bug) set
value of this field can affect the behavior of class creation.
So, we decided that the controllers would manage their hierarchy and
just return NULL if they don't support the specific depth in the
hierarchy. Then core would decide whether to create the class without
that specific resource controller or not.
Currently, core just fails the creation of a class if a resource
controller fails to create its part. The reason being that it will be
confusing to the user to see a specific resource at one level and not at
a lower level.
Here are the options we have and i want to know what others feel:
1. Leave the current behavior.
2. If a resource controller returns NULL, proceed with the core class
creation and return the class if there is at least one resource in that
class.
3. Use res_hdepth and fail class creation if the depth is higher than
res_hdepth.
Thanks
chandra
>
> Thanks,
> MAEDA Naoaki
>
>
>
>
>
>
--
----------------------------------------------------------------------
Chandra Seetharaman | Be careful what you choose....
- [EMAIL PROTECTED] | .......you may get it.
----------------------------------------------------------------------
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
ckrm-tech mailing list
https://lists.sourceforge.net/lists/listinfo/ckrm-tech