Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
9145bcf6
Commit
9145bcf6
authored
Jun 10, 2006
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Set appropriate max_cache_size.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
1f4d4a7e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
arch/sparc64/kernel/smp.c
arch/sparc64/kernel/smp.c
+35
-0
No files found.
arch/sparc64/kernel/smp.c
View file @
9145bcf6
...
...
@@ -1287,6 +1287,40 @@ int setup_profiling_timer(unsigned int multiplier)
return
0
;
}
static
void
__init
smp_tune_scheduling
(
void
)
{
int
instance
,
node
;
unsigned
int
def
,
smallest
=
~
0U
;
def
=
((
tlb_type
==
hypervisor
)
?
(
3
*
1024
*
1024
)
:
(
4
*
1024
*
1024
));
instance
=
0
;
while
(
!
cpu_find_by_instance
(
instance
,
&
node
,
NULL
))
{
unsigned
int
val
;
val
=
prom_getintdefault
(
node
,
"ecache-size"
,
def
);
if
(
val
<
smallest
)
smallest
=
val
;
instance
++
;
}
/* Any value less than 256K is nonsense. */
if
(
smallest
<
(
256U
*
1024U
))
smallest
=
256
*
1024
;
max_cache_size
=
smallest
;
if
(
smallest
<
1U
*
1024U
*
1024U
)
printk
(
KERN_INFO
"Using max_cache_size of %uKB
\n
"
,
smallest
/
1024U
);
else
printk
(
KERN_INFO
"Using max_cache_size of %uMB
\n
"
,
smallest
/
1024U
/
1024U
);
}
/* Constrain the number of cpus to max_cpus. */
void
__init
smp_prepare_cpus
(
unsigned
int
max_cpus
)
{
...
...
@@ -1322,6 +1356,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
}
smp_store_cpu_info
(
boot_cpu_id
);
smp_tune_scheduling
();
}
/* Set this up early so that things like the scheduler can init
...
...
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