LKML Archive mirror
 help / color / mirror / Atom feed
* Restricting Processor Usage
@ 2008-05-09 16:27 Brian McGrew
  2008-05-09 19:28 ` Ingo Oeser
  0 siblings, 1 reply; 2+ messages in thread
From: Brian McGrew @ 2008-05-09 16:27 UTC (permalink / raw
  To: linux-kernel

Now that I've got sched_(set|get)affinity working (thank you all for all of
the great help), I need to figure out how to unload the processors in the
machine.

When the system comes up, by default the general system load is spread
across all the processors, even when it is idle.  I'm looking for a way to
force everything on the system (kernel, X, gnome, etc.) to run on only one
processor and leave the remaining processors idea for thread assignments.
I'm doing very heavy image processing and need all the power I can get out
of each CPU.

How can I do this?  Just make the system as a whole run on only one CPU but
allow processes and threads that I create to set their affinity to the
remaining unloaded CPU's???

-brian


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Restricting Processor Usage
  2008-05-09 16:27 Restricting Processor Usage Brian McGrew
@ 2008-05-09 19:28 ` Ingo Oeser
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Oeser @ 2008-05-09 19:28 UTC (permalink / raw
  To: Brian McGrew; +Cc: linux-kernel

Hi Brian
On Friday 09 May 2008, you wrote:
> Now that I've got sched_(set|get)affinity working (thank you all for all of
> the great help), I need to figure out how to unload the processors in the
> machine.

excerpt from Documentation/kernel-parameters.txt:

        isolcpus=       [KNL,SMP] Isolate CPUs from the general scheduler.
                        Format:
                        <cpu number>,...,<cpu number>
                        or
                        <cpu number>-<cpu number>  (must be a positive range in ascending order)
                        or a mixture
                        <cpu number>,...,<cpu number>-<cpu number>
                        This option can be used to specify one or more CPUs
                        to isolate from the general SMP balancing and scheduling
                        algorithms. The only way to move a process onto or off
                        an "isolated" CPU is via the CPU affinity syscalls.
                        <cpu number> begins at 0 and the maximum value is
                        "number of CPUs in system - 1".

                        This option is the preferred way to isolate CPUs. The
                        alternative -- manually setting the CPU mask of all
                        tasks in the system -- can cause problems and
                        suboptimal load balancer performance.

And then use sched_set_affinity to fill your CPUs.

Happy imaging :-)


Best Regards

Ingo Oeser

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-09 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-09 16:27 Restricting Processor Usage Brian McGrew
2008-05-09 19:28 ` Ingo Oeser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).