Skip to content

Commit

Permalink
sched: Reduce forkexec_idx
Browse files Browse the repository at this point in the history
If we're looking to place a new task, we might as well find the
idlest position _now_, not 1 tick ago.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Sep 15, 2009
1 parent 0ec9fab commit b8a543e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions arch/ia64/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void build_cpu_to_node_map(void);
.idle_idx = 1, \
.newidle_idx = 0, \
.wake_idx = 0, \
.forkexec_idx = 1, \
.forkexec_idx = 0, \
.flags = SD_LOAD_BALANCE \
| SD_BALANCE_NEWIDLE \
| SD_BALANCE_EXEC \
Expand All @@ -89,7 +89,7 @@ void build_cpu_to_node_map(void);
.idle_idx = 2, \
.newidle_idx = 0, \
.wake_idx = 0, \
.forkexec_idx = 1, \
.forkexec_idx = 0, \
.flags = SD_LOAD_BALANCE \
| SD_BALANCE_NEWIDLE \
| SD_BALANCE_EXEC \
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
.idle_idx = 2, \
.newidle_idx = 0, \
.wake_idx = 0, \
.forkexec_idx = 1, \
.forkexec_idx = 0, \
.flags = SD_LOAD_BALANCE \
| SD_BALANCE_FORK \
| SD_BALANCE_EXEC \
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/include/asm/topology_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static inline int pcibus_to_node(struct pci_bus *pbus)
.idle_idx = 2, \
.newidle_idx = 0, \
.wake_idx = 0, \
.forkexec_idx = 1, \
.forkexec_idx = 0, \
.flags = SD_LOAD_BALANCE \
| SD_BALANCE_FORK \
| SD_BALANCE_EXEC \
Expand Down
4 changes: 1 addition & 3 deletions arch/x86/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,11 @@ extern unsigned long node_remap_size[];

# define SD_CACHE_NICE_TRIES 1
# define SD_IDLE_IDX 1
# define SD_FORKEXEC_IDX 0

#else

# define SD_CACHE_NICE_TRIES 2
# define SD_IDLE_IDX 2
# define SD_FORKEXEC_IDX 1

#endif

Expand All @@ -137,7 +135,7 @@ extern unsigned long node_remap_size[];
.idle_idx = SD_IDLE_IDX, \
.newidle_idx = 0, \
.wake_idx = 0, \
.forkexec_idx = SD_FORKEXEC_IDX, \
.forkexec_idx = 0, \
\
.flags = 1*SD_LOAD_BALANCE \
| 1*SD_BALANCE_NEWIDLE \
Expand Down
4 changes: 2 additions & 2 deletions include/linux/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ int arch_update_cpu_topology(void);
.cache_nice_tries = 1, \
.busy_idx = 2, \
.wake_idx = 0, \
.forkexec_idx = 1, \
.forkexec_idx = 0, \
\
.flags = 1*SD_LOAD_BALANCE \
| 1*SD_BALANCE_NEWIDLE \
Expand Down Expand Up @@ -153,7 +153,7 @@ int arch_update_cpu_topology(void);
.idle_idx = 1, \
.newidle_idx = 0, \
.wake_idx = 0, \
.forkexec_idx = 1, \
.forkexec_idx = 0, \
\
.flags = 1*SD_LOAD_BALANCE \
| 1*SD_BALANCE_NEWIDLE \
Expand Down

0 comments on commit b8a543e

Please sign in to comment.