LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
LinkBack Search this Thread
Old 09-28-2009, 11:05 AM   #1
nottix
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Rep: Reputation: 0
How to exclusively assign process to a core?


Hi All,

i need to exclusively assign a process to a core on SMP system.
I should do that with a kernel module not in user-mode.

Is possible to do that?

Thanks

nottix
 
Old 09-28-2009, 12:36 PM   #2
krkz
LQ Newbie
 
Registered: Sep 2009
Distribution: Archlinux
Posts: 8

Rep: Reputation: 1
Hi.
Try CGroups mechanism. First you should enable appropriate options in your kernel. They are CONFIG_GROUP_SCHED and CONFIG_CGROUPS afair.
Then check this guide, it's very detail (its from Documentation/cgroups).

However, try man taskset. Maybe it will be enough.

Last edited by krkz; 09-28-2009 at 12:38 PM.
 
Old 09-28-2009, 12:40 PM   #3
nottix
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by krkz View Post
Hi.
Try CGroups mechanism. First you should enable appropriate options in your kernel. They are CONFIG_GROUP_SCHED and CONFIG_CGROUPS afair.
Then check this guide, it's very detail.

However, try man taskset. Maybe it will be enough.
Thanks. I'll go to trying :-)
 
Old 09-28-2009, 02:55 PM   #4
nottix
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Original Poster
Rep: Reputation: 0
I tried CGroup, but it doesn't assign exclusively a process to core.

Example:
I have 4 cores, 20 processes.
Process 1 -> Core 1
Processes 2-19 -> Core 2-4

Every time a new process has been created it doesn't must be assigned to Core 1.

Any suggestions?
 
Old 09-28-2009, 04:16 PM   #5
krkz
LQ Newbie
 
Registered: Sep 2009
Distribution: Archlinux
Posts: 8

Rep: Reputation: 1
Well. How do you initiate your cgroups?

Maybe you should try to arrange cpuset1 for core1, cpuset2 for cores2-4.
Then add needed process to cpuset1 and all other processes, including init, to cpuset2. Thus, all new processes should be in cpuset2.

P.S. I have no possibility to test it today. Maybe in 1-2 days.
 
Old 09-28-2009, 04:38 PM   #6
nottix
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Ok. I'll try it soon.

P.S.: I read about cpuset.cpu_exclusive, is it a possible solution?

Thank you for your help :-)
 
  


Reply

Tags
kernel, process, scheduler, smp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to assign the OS to a core? chasgames Linux - Newbie 0 08-19-2009 06:38 AM
LXer: Netflix Now Exclusively Bluray LXer Syndicated Linux News 0 02-12-2008 05:20 AM
Linux designed for a TERMINAL exclusively??? ecsed Linux - Software 6 07-06-2005 10:15 AM
How to assign one particular process to particular CPU, in multiprocessor Architeture sudha Linux - General 1 01-23-2005 10:53 AM
How do you assign a process to a specific processor? ter_roshak Linux - General 1 12-19-2003 12:38 AM


All times are GMT -5. The time now is 01:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration