Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.embedded > #462

Set Processor Affinity for x86

Newsgroups comp.os.linux.embedded
Date 2013-04-24 01:57 -0700
Message-ID <947ac9b6-5cc4-44bb-a466-9365d81d78ca@googlegroups.com> (permalink)
Subject Set Processor Affinity for x86
From ghosh.subhasish@gmail.com

Show all headers | View raw


Hi,

I need to understand how to run a function on a core other than the current.

For example, my main() function could be on core-0, but I want to run a function on core-1.

There are APIs in Linux like sched_setaffinity();

The platform that I am using does not have any OS or scheduler.

But, when I looked into the code of this function in the Kernel, I see that it just updates the task_struct.

I need to understand how the dispatcher, dispatches the code on another core.

Initially, my thought was to modify the Instruction Pointer of the other core to the code section of the function. But, I found that we cannot change the IP from code.

There should be a general way to do this. Can someone please suggest one ?

Back to comp.os.linux.embedded | Previous | NextNext in thread | Find similar


Thread

Set Processor Affinity for x86 ghosh.subhasish@gmail.com - 2013-04-24 01:57 -0700
  Re: Set Processor Affinity for x86 Przemek Klosowski <przemek@tux.dot.org> - 2013-04-25 02:08 +0000
    Re: Set Processor Affinity for x86 ghosh.subhasish@gmail.com - 2013-04-25 09:12 -0700

csiph-web