On Tue, 19 Aug 2014, Gregory Farnum wrote:
> On Wed, Aug 13, 2014 at 4:09 AM, Viral Mehta <[email protected]> wrote:
> > Hi,
> >
> > I was looking at ceph/crush/builder.c crush_make_tree_bucket() function,
> >
> > I would like to understand what "size" argument refers to ? Generally 
> > speaking
> > Tree Size is Total Number of the nodes. And this would be the same as 
> > number of
> > items.
> >
> > But, crush.h mentions that it is NOT true. Can someone shed some light ?
> 
> This is some pretty opaque code, and I don't spend much time in it,
> but just looking at the surroundings the argument is just the "size"
> of the following array (int *items). It's the number of entries there
> are within this bucket.

Sorry I missed this thread earlier!

Normally size is the number of items.  In the tree bucket case, it is the 
power of 2 that is 2x the number of items (or something similar), as it is 
mixed up with the internal implementation (which puts items at the leaves 
and has internal nodes with weights).

Note that I believe there is a bug in the tree mapping code that hasn't 
been addressed just because nobody ever users it.  The default is straw 
and that is usually the right choice...

sage

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to