Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
de7fa296
Commit
de7fa296
authored
Feb 21, 2007
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MIPS] SMP: Get smp_tune_scheduling to do something useful.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
9693a853
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
21 deletions
+4
-21
arch/mips/kernel/smp.c
arch/mips/kernel/smp.c
+4
-21
No files found.
arch/mips/kernel/smp.c
View file @
de7fa296
...
...
@@ -51,31 +51,14 @@ int __cpu_logical_map[NR_CPUS]; /* Map logical to physical */
EXPORT_SYMBOL
(
phys_cpu_present_map
);
EXPORT_SYMBOL
(
cpu_online_map
);
/* This happens early in bootup, can't really do it better */
static
void
smp_tune_scheduling
(
void
)
{
struct
cache_desc
*
cd
=
&
current_cpu_data
.
scache
;
unsigned
long
cachesize
;
/* kB */
unsigned
long
cpu_khz
;
unsigned
long
cachesize
=
cd
->
linesz
*
cd
->
sets
*
cd
->
ways
;
/*
* Crude estimate until we actually meassure ...
*/
cpu_khz
=
loops_per_jiffy
*
2
*
HZ
/
1000
;
/*
* Rough estimation for SMP scheduling, this is the number of
* cycles it takes for a fully memory-limited process to flush
* the SMP-local cache.
*
* (For a P5 this pretty much means we will choose another idle
* CPU almost always at wakeup time (this is due to the small
* L1 cache), on PIIs it's around 50-100 usecs, depending on
* the cache size)
*/
if
(
!
cpu_khz
)
return
;
cachesize
=
cd
->
linesz
*
cd
->
sets
*
cd
->
ways
;
if
(
cachesize
>
max_cache_size
)
max_cache_size
=
cachesize
;
}
extern
void
__init
calibrate_delay
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment