Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145716
b: refs/heads/master
c: 4200efd
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed May 19, 2009
1 parent b629f0d commit 0a4d5f1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2d02494f5a90f2e4b3c4c6acc85ec94674cdc431
refs/heads/master: 4200efd9acda4accf24640f1e77d24fdcdb524df
25 changes: 22 additions & 3 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,17 @@ struct sched_group {
*/
u32 reciprocal_cpu_power;

unsigned long cpumask[];
/*
* The CPUs this group covers.
*
* NOTE: this field is variable length. (Allocated dynamically
* by attaching extra space to the end of the structure,
* depending on how many CPUs the kernel has booted up with)
*
* It is also be embedded into static data structures at build
* time. (See 'struct static_sched_group' in kernel/sched.c)
*/
unsigned long cpumask[0];
};

static inline struct cpumask *sched_group_cpus(struct sched_group *sg)
Expand Down Expand Up @@ -925,8 +935,17 @@ struct sched_domain {
char *name;
#endif

/* span of all CPUs in this domain */
unsigned long span[];
/*
* Span of all CPUs in this domain.
*
* NOTE: this field is variable length. (Allocated dynamically
* by attaching extra space to the end of the structure,
* depending on how many CPUs the kernel has booted up with)
*
* It is also be embedded into static data structures at build
* time. (See 'struct static_sched_domain' in kernel/sched.c)
*/
unsigned long span[0];
};

static inline struct cpumask *sched_domain_span(struct sched_domain *sd)
Expand Down
5 changes: 3 additions & 2 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -7948,8 +7948,9 @@ int sched_smt_power_savings = 0, sched_mc_power_savings = 0;

/*
* The cpus mask in sched_group and sched_domain hangs off the end.
* FIXME: use cpumask_var_t or dynamic percpu alloc to avoid wasting space
* for nr_cpu_ids < CONFIG_NR_CPUS.
*
* ( See the the comments in include/linux/sched.h:struct sched_group
* and struct sched_domain. )
*/
struct static_sched_group {
struct sched_group sg;
Expand Down

0 comments on commit 0a4d5f1

Please sign in to comment.