On Tue, Oct 28, 2014 at 1:51 PM, Iain Young, G7III <[email protected]> wrote:

> Hi Folks,
>
> A quick question on CPU affinity when using hier blocks. I can set the
> affinity in each of the blocks that makes up the heir block, but I can
> also set it once I instantiate my hier block in my main flowgraph.
>
> Anyone know the behaviour in this case ? If I leave all the blocks
> within the heir block with no CPU affinity defined, will they inherit
> what I configure in the heir block itself ?
>
> If I put a CPU affinity on those blocks within the heir block, I guess
> that would be honoured over what I configure for the hier block itself ?
>
> Can anyone confirm ? I'm doing some multiple frequency RX, with
> identical receive chains, which I'd like to put into a hier block, thus
> simplifying my main flowgraph, but keep all processing for that chain on
> one CPU
>
>
> Iain
>

Iain,

No, right now, when the hier_block affinity value is set, it forces all
blocks within it to that value for the processor affinity. The individual
settings on blocks do not supersede this setting. Part of the reason is how
this stuff is managed inside of the hier_block and basic_block classes and
how hier_blocks are represented as structures internally. There's some work
we'd like to pursue in future releases that would make this representation
easier to work with that should allow for better control of these settings.
I think that what you want to do is the "right" way to handle things. If a
block inside a hier_block does not have the affinity set, inherit it from
the hier_block; otherwise, ignore the hier_block's setting and use the
locally-set value.

Keep in mind, though, that the use of the affinity value is experimental in
the sense that we don't have a full understanding of what it's going to do
on your system. The default scheduling of threads might be the best thing
for you and the flowgraph, or setting the affinity might be a really good
thing if you do it properly. It's really hard to say. A main motivation for
creating the ability to set this value was partly so that we had the option
of exploring this space, especially as we predict an increasing number of
cores made available to us as well as heterogeneous CPUs where hand-tuning
becomes more interesting and possibly more useful.

Tom
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to