[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <455476C0.6010204@in.ibm.com>
Date: Fri, 10 Nov 2006 18:25:28 +0530
From: Balbir Singh <balbir@...ibm.com>
To: Pavel Emelianov <xemul@...nvz.org>
CC: dev@...nvz.org, ckrm-tech@...ts.sourceforge.net,
haveblue@...ibm.com,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux MM <linux-mm@...ck.org>, rohitseth@...gle.com
Subject: Re: [ckrm-tech] [RFC][PATCH 6/8] RSS controller shares allocation
Pavel Emelianov wrote:
> [snip]
>
>>>> + for_each_child(child, res->rgroup) {
>>>> + child_res = get_memctlr(child);
>>>> + BUG_ON(!child_res);
>>>> + recalc_and_propagate(child_res, res);
>>> Recursion? Won't it eat all the stack in case of a deep tree?
>> The depth of the hierarchy can be controlled. Recursion is needed
>> to do a DFS walk
>
> That's another point against recursion - bad root can
> crash the kernel... If we are about to give container's
> users ability to make their own subtrees then we *must*
> avoid recursion. There's an algorithm that allows one
> to walk the tree like this w/o recursion.
Bad pointers are always bad, whether they are the root or
any other pointer. Tree traversal is a generic infrastructure issue
for any infrastructure that supports a hierarchy.
Are you talking about threaded trees? Yes, they can be traversed
without recursion. I need to recheck my DS reference to double
check.
>
> [snip]
>
>>> I didn't find where in this patches this callback is called.
>> It's a part of the resource groups infrastructure. It's been ported
>> on top of Paul Menage's containers patches. The code can be easily
>> adapted to work directly with containers instead of resource groups
>> if required.
>
>
> Could you please give me a link to the patch where this
> is called?
Please see
http://www.mail-archive.com/ckrm-tech@lists.sourceforge.net/msg03333.html
--
Balbir Singh,
Linux Technology Center,
IBM Software Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists