Hi Gregory, On Sat, Mar 22, 2008 at 12:04:04PM -0600, Gregory Haskins wrote:The changes you have suggested are consistent with what we do for rt_rq and cfs_rq. Here is the patch with these modifications. Signed-off-by: Ankita Garg <ankita@in.ibm.com> Index: linux-2.6.24.3-rt3/kernel/sched.c =================================================================== --- linux-2.6.24.3-rt3.orig/kernel/sched.c 2008-03-21 22:57:04.000000000 +0530 +++ linux-2.6.24.3-rt3/kernel/sched.c 2008-03-23 14:09:22.000000000 +0530 @@ -337,22 +337,27 @@ * object. * */ -struct root_domain { - atomic_t refcount; - cpumask_t span; - cpumask_t online; +struct rt_root_domain { /* * The "RT overload" flag: it gets set if a CPU has more than * one runnable RT task. */ - cpumask_t rto_mask; - atomic_t rto_count; + cpumask_t overload_mask; + atomic_t overload_count; #ifdef CONFIG_SMP struct cpupri cpupri; #endif }; +struct root_domain { + atomic_t refcount; + cpumask_t span; + cpumask_t online; + + struct rt_root_domain rt; +}; + /* * By default the system creates a single root-domain with all cpus as * members (mimicking the global state we have today). @@ -6332,7 +6337,7 @@ cpus_clear(rd->span); cpus_clear(rd->online); - cpupri_init(&rd->cpupri); + cpupri_init(&rd->rt.cpupri); } Index: linux-2.6.24.3-rt3/kernel/sched_rt.c =================================================================== --- linux-2.6.24.3-rt3.orig/kernel/sched_rt.c 2008-03-21 22:57:04.000000000 +0530 +++ linux-2.6.24.3-rt3/kernel/sched_rt.c 2008-03-23 14:12:45.000000000 +0530 @@ -7,12 +7,12 @@ static inline int rt_overloaded(struct rq *rq) { - return atomic_read(&rq->rd->rto_count); + return atomic_read(&rq->rd->rt.overload_count); } static inline void rt_set_overload(struct rq *rq) { - cpu_set(rq->cpu, rq->rd->rto_mask); + cpu_set(rq->cpu, rq->rd->rt.overload_mask); /* * Make sure the mask is visible before we set * the overload count. That is checked to determine @@ -21,14 +21,14 @@ * updated yet. */ wmb(); - atomic_inc(&rq->rd->rto_count); + atomic_inc(&rq->rd->rt.overload_count); } static inline void rt_clear_overload(struct rq *rq) { /* the order here really doesn't matter */ - atomic_dec(&rq->rd->rto_count); - cpu_clear(rq->cpu, rq->rd->rto_mask); + atomic_dec(&rq->rd->rt.overload_count); + cpu_clear(rq->cpu, rq->rd->rt.overload_mask); } static void update_rt_migration(struct rq *rq) @@ -78,7 +78,7 @@ #ifdef CONFIG_SMP if (p->prio < rq->rt.highest_prio) { rq->rt.highest_prio = p->prio; - cpupri_set(&rq->rd->cpupri, rq->cpu, p->prio); + cpupri_set(&rq->rd->rt.cpupri, rq->cpu, p->prio); } if (p->nr_cpus_allowed > 1) rq->rt.rt_nr_migratory++; @@ -114,7 +114,7 @@ } if (rq->rt.highest_prio != highest_prio) - cpupri_set(&rq->rd->cpupri, rq->cpu, rq->rt.highest_prio); + cpupri_set(&rq->rd->rt.cpupri, rq->cpu, rq->rt.highest_prio); update_rt_migration(rq); #endif /* CONFIG_SMP */ @@ -363,7 +363,7 @@ { int count; - count = cpupri_find(&task_rq(task)->rd->cpupri, task, lowest_mask); + count = cpupri_find(&task_rq(task)->rd->rt.cpupri, task, lowest_mask); /* * cpupri cannot efficiently tell us how many bits are set, so it only @@ -599,7 +599,7 @@ next = pick_next_task_rt(this_rq); - for_each_cpu_mask(cpu, this_rq->rd->rto_mask) { + for_each_cpu_mask(cpu, this_rq->rd->rt.overload_mask) { if (this_cpu == cpu) continue; @@ -763,7 +763,7 @@ if (rq->rt.overloaded) rt_set_overload(rq); - cpupri_set(&rq->rd->cpupri, rq->cpu, rq->rt.highest_prio); + cpupri_set(&rq->rd->rt.cpupri, rq->cpu, rq->rt.highest_prio); } /* Assumes rq->lock is held */ @@ -772,7 +772,7 @@ if (rq->rt.overloaded) rt_clear_overload(rq); - cpupri_set(&rq->rd->cpupri, rq->cpu, CPUPRI_INVALID); + cpupri_set(&rq->rd->rt.cpupri, rq->cpu, CPUPRI_INVALID); } /* -- Regards, Ankita Garg (ankita@in.ibm.com) Linux Technology Center IBM India Systems & Technology Labs, Bangalore, India --
| Jeremy Fitzhardinge | Re: [RFC 00/15] x86_64: Optimize percpu accesses |
| jmerkey | [ANNOUNCE] mdb: Merkey's Linux Kernel Debugger 2.6.27-rc4 released |
| Greg Kroah-Hartman | [PATCH 021/196] ISDN: Convert from class_device to device for ISDN capi |
| Ingo Molnar | Re: [PATCH 00/23] per device dirty throttling -v8 |
git: | |
| Linus Torvalds | Re: VCS comparison table |
| Peter Stahlir | Git as a filesystem |
| Johannes Schindelin | Re: git on MacOSX and files with decomposed utf-8 file names |
| Bill Lear | Meaning of "fatal: protocol error: bad line length character"? |
| Mayuresh Kathe | Re: What is our ultimate goal?? |
| Richard Stallman | Real men don't attack straw men |
| bofh | Re: web development on OpenBSD |
| Kevin | uvm_mapent_alloc: out of static map entries on 4.3 i386 |
| Mark Lord | Re: 2.6.25-rc8: FTP transfer errors |
| Evgeniy Polyakov | Re: [BUG] New Kernel Bugs |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Andi Kleen | [PATCH RFC] [1/9] Core module symbol namespaces code and intro. |
