This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CPU affinity in eCos


Hi,

Thanks a lot Nick.

I am actually working on a single processor system with two hardware
threads. And I want to run my test on a particular processor and I
want this to be deterministic; which would enable me to run the same
test again on the same processor.

I am not sure if this would work, but I was wondering if the function
void Cyg_Scheduler_Base::set_current_thread(Cyg_Thread *thread,
HAL_SMP_CPU_TYPE cpu) would be of any use in this regard. This
function is invoked in sched.cxx and only a thread is passed to it as
an argument. However if I can somehow pass the HAL_SMP_CPU_TYPE cpiID,
would that set my current thread in such a way that it can be run
deterministically on that particular cpu (with ID = cpuID)?

Thanks!!

--Archana Sastry


On Wed, Oct 14, 2009 at 5:40 AM, Nick Garnett <nickg@ecoscentric.com> wrote:
> Archana Sastry <sastry.archana@gmail.com> writes:
>
>> Hi everyone,
>>
>> I am a newbie to eCos, and I am trying to bind my thread to a
>> particular processor (sort of Hard CPU affinity). I need this
>> capability for some kind of deterministic testing. I have gone through
>> a previous post on the ecos-discuss mailing list dated: 02-14-2007,
>> title: pthread processor binding.
>>
>> For this, I have looked at the sched.cxx and sched.hxx files. Could
>> anyone please provide me with a few pointers regarding this, as in
>> what functions I should be looking into if it is possible with minimal
>> change to the kernel.
>
> Processor affinity only makes sense for an SMP system. SMP support in
> eCos is experimental and incomplete. It has not been maintained and
> has probably suffered from bitrot, application and device driver
> support are rudimentary. Given that, worrying about more advanced
> features such as CPU affinity is somewhat premature.
>
> I don't know what your target hardware is, but if it involves multiple
> CPUs, eCos is probably not currently the right OS to use for it.
>
>
> --
> Nick Garnett ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? eCos Kernel Architect
> eCosCentric Limited ? ?http://www.eCosCentric.com ? ? ? The eCos experts
> Barnwell House, Barnwell Drive, Cambridge, UK. ? ? ?Tel: +44 1223 245571
> Registered in England and Wales: ? ? ? ? ? ? ? ? ? ? ? ? Reg No: 4422071
>
>

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]