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
nexedi
linux
Commits
291c54ff
Commit
291c54ff
authored
Sep 06, 2008
by
Ingo Molnar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sched/cpuset' into sched/urgent
parents
49048622
dfb512ec
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
196 additions
and
137 deletions
+196
-137
include/linux/cpuset.h
include/linux/cpuset.h
+1
-1
kernel/cpuset.c
kernel/cpuset.c
+182
-130
kernel/sched.c
kernel/sched.c
+13
-6
No files found.
include/linux/cpuset.h
View file @
291c54ff
...
@@ -160,7 +160,7 @@ static inline int current_cpuset_is_being_rebound(void)
...
@@ -160,7 +160,7 @@ static inline int current_cpuset_is_being_rebound(void)
static
inline
void
rebuild_sched_domains
(
void
)
static
inline
void
rebuild_sched_domains
(
void
)
{
{
partition_sched_domains
(
0
,
NULL
,
NULL
);
partition_sched_domains
(
1
,
NULL
,
NULL
);
}
}
#endif
/* !CONFIG_CPUSETS */
#endif
/* !CONFIG_CPUSETS */
...
...
kernel/cpuset.c
View file @
291c54ff
This diff is collapsed.
Click to expand it.
kernel/sched.c
View file @
291c54ff
...
@@ -7696,24 +7696,27 @@ static int dattrs_equal(struct sched_domain_attr *cur, int idx_cur,
...
@@ -7696,24 +7696,27 @@ static int dattrs_equal(struct sched_domain_attr *cur, int idx_cur,
* and partition_sched_domains() will fallback to the single partition
* and partition_sched_domains() will fallback to the single partition
* 'fallback_doms', it also forces the domains to be rebuilt.
* 'fallback_doms', it also forces the domains to be rebuilt.
*
*
* If doms_new==NULL it will be replaced with cpu_online_map.
* ndoms_new==0 is a special case for destroying existing domains.
* It will not create the default domain.
*
* Call with hotplug lock held
* Call with hotplug lock held
*/
*/
void
partition_sched_domains
(
int
ndoms_new
,
cpumask_t
*
doms_new
,
void
partition_sched_domains
(
int
ndoms_new
,
cpumask_t
*
doms_new
,
struct
sched_domain_attr
*
dattr_new
)
struct
sched_domain_attr
*
dattr_new
)
{
{
int
i
,
j
;
int
i
,
j
,
n
;
mutex_lock
(
&
sched_domains_mutex
);
mutex_lock
(
&
sched_domains_mutex
);
/* always unregister in case we don't destroy any domains */
/* always unregister in case we don't destroy any domains */
unregister_sched_domain_sysctl
();
unregister_sched_domain_sysctl
();
if
(
doms_new
==
NULL
)
n
=
doms_new
?
ndoms_new
:
0
;
ndoms_new
=
0
;
/* Destroy deleted domains */
/* Destroy deleted domains */
for
(
i
=
0
;
i
<
ndoms_cur
;
i
++
)
{
for
(
i
=
0
;
i
<
ndoms_cur
;
i
++
)
{
for
(
j
=
0
;
j
<
n
doms_new
;
j
++
)
{
for
(
j
=
0
;
j
<
n
;
j
++
)
{
if
(
cpus_equal
(
doms_cur
[
i
],
doms_new
[
j
])
if
(
cpus_equal
(
doms_cur
[
i
],
doms_new
[
j
])
&&
dattrs_equal
(
dattr_cur
,
i
,
dattr_new
,
j
))
&&
dattrs_equal
(
dattr_cur
,
i
,
dattr_new
,
j
))
goto
match1
;
goto
match1
;
...
@@ -7726,7 +7729,6 @@ void partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
...
@@ -7726,7 +7729,6 @@ void partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
if
(
doms_new
==
NULL
)
{
if
(
doms_new
==
NULL
)
{
ndoms_cur
=
0
;
ndoms_cur
=
0
;
ndoms_new
=
1
;
doms_new
=
&
fallback_doms
;
doms_new
=
&
fallback_doms
;
cpus_andnot
(
doms_new
[
0
],
cpu_online_map
,
cpu_isolated_map
);
cpus_andnot
(
doms_new
[
0
],
cpu_online_map
,
cpu_isolated_map
);
dattr_new
=
NULL
;
dattr_new
=
NULL
;
...
@@ -7763,8 +7765,13 @@ void partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
...
@@ -7763,8 +7765,13 @@ void partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
int
arch_reinit_sched_domains
(
void
)
int
arch_reinit_sched_domains
(
void
)
{
{
get_online_cpus
();
get_online_cpus
();
/* Destroy domains first to force the rebuild */
partition_sched_domains
(
0
,
NULL
,
NULL
);
rebuild_sched_domains
();
rebuild_sched_domains
();
put_online_cpus
();
put_online_cpus
();
return
0
;
return
0
;
}
}
...
@@ -7848,7 +7855,7 @@ static int update_sched_domains(struct notifier_block *nfb,
...
@@ -7848,7 +7855,7 @@ static int update_sched_domains(struct notifier_block *nfb,
case
CPU_ONLINE_FROZEN
:
case
CPU_ONLINE_FROZEN
:
case
CPU_DEAD
:
case
CPU_DEAD
:
case
CPU_DEAD_FROZEN
:
case
CPU_DEAD_FROZEN
:
partition_sched_domains
(
0
,
NULL
,
NULL
);
partition_sched_domains
(
1
,
NULL
,
NULL
);
return
NOTIFY_OK
;
return
NOTIFY_OK
;
default:
default:
...
...
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