On 12 March 2015 at 11:34, Taras Kondratiuk <taras.kondrat...@linaro.org>
wrote:

> On 03/12/2015 12:03 PM, Savolainen, Petri (Nokia - FI/Espoo) wrote:
>
>>
>>
>>  -----Original Message-----
>>> From: ext Taras Kondratiuk [mailto:taras.kondrat...@linaro.org]
>>> Sent: Wednesday, March 11, 2015 5:18 PM
>>> To: Savolainen, Petri (Nokia - FI/Espoo); ext Christophe Milard; lng-
>>> o...@lists.linaro.org
>>> Subject: Re: [lng-odp] odp_cpu_count() vs odp_cpumask size
>>>
>>> On 03/11/2015 04:46 PM, Savolainen, Petri (Nokia - FI/Espoo) wrote:
>>>
>>>> Continuation of cpumask discussion on the call... For creating arbitrary
>>>> masks (e.g. fill in a mask with CPU ids of another ODP program in the
>>>> system, or testing all possible mask bits), we may need two more calls:
>>>>
>>>> /**
>>>>
>>>> * @return Maximum number of CPUs a mask can hold
>>>>
>>>> */
>>>>
>>>> int odp_cpumask_max_cpus(void)
>>>>
>>>> /**
>>>>
>>>>    * Set all CPUs in the mask
>>>>
>>>>    *
>>>>
>>>>    * After the call, the mask has odp_cpumask_max_cpus() CPUs set.
>>>>
>>>>     * @note CPU numbering may not be contiguous.
>>>>
>>>> */
>>>>
>>>> void odp_cpumask_setall(odp_cpumask_t *mask)
>>>>
>>>> -Petri
>>>>
>>>> *From:*lng-odp-boun...@lists.linaro.org
>>>> [mailto:lng-odp-boun...@lists.linaro.org] *On Behalf Of *ext
>>>> Savolainen,
>>>> Petri (Nokia - FI/Espoo)
>>>> *Sent:* Wednesday, March 11, 2015 2:09 PM
>>>> *To:* ext Christophe Milard; lng-odp@lists.linaro.org
>>>> *Subject:* Re: [lng-odp] odp_cpu_count() vs odp_cpumask size
>>>>
>>>> Actually, this is equal to odp_cpu_max():
>>>>
>>>> odp_cpumask_t mask;
>>>>
>>>> odp_cpu_mask(&mask)
>>>>
>>>> odp_cpumask_last(&mask)
>>>>
>>>> So maybe odp_cpu_mask() is only new thing we need.
>>>>
>>>
>>> Hi Petri
>>>
>>> It is not clear to me why do we need odp_cpu_* and odp_cpumask_* API.
>>>
>>> They are used now to create threads and set CPU affinity. But this is
>>> done by ODP helpers, because it is out of ODP scope. Shouldn't 'cpu' and
>>> 'cpumask' be a part of helpers too?
>>>
>>
>> The original idea was to use cpumask in definition of
>> odp_schedule_group_t (still on todo list). I need go through that use case
>> and see if e.g. a thread mask would work instead.
>>
>
> Currently cpumask is used for 'real' CPUs, but IMO scheduler group
> should operate on thread IDs instead.
>
We need a clear understanding of these concepts so we can extend the
architecture to use (CPU or thread) groups for "local" scheduling.


>
>> E.g. odp_cpu_id() is good for debugging (e.g. that thread pinning is
>> working).
>>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to