Re: Forward port of latest RT patch (2.6.21.5-rt20) to 2.6.22 available

Peter Williams
2007-07-13T07:14:54Z

[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]

Ingo Molnar wrote:
> * Gregory Haskins <ghaskins@novell.com> wrote:
>
>> On Thu, 2007-07-12 at 14:07 +0200, Ingo Molnar wrote:
>>> * Gregory Haskins <ghaskins@novell.com> wrote:
>>>
>>>> Hi Ingo, Thomas, and the greater linux-rt community,
>>>>
>>>> I just wanted to let you guys know that our team has a port of
>>>> the 21.5-rt20 patch for the 2.6.22 kernel available. [...]
>>> great! We had the upstream -rt port to .22 in the works too, it was just
>>> held up by the hpet breakage - which Thomas managed to fix earlier
>>> today. I've released the 2.6.22.1-rt1 patch to the usual place:
>>>
>>> http://redhat.com/~mingo/realtime-preempt/
>> Thats awesome, Ingo! Thanks! Could you publish a broken out version
>> as well? We found it extremely valuable to be able to bisect this
>> beast while working on the 21-22 port.
>
> we are working on something in this area :) Stay tuned ...

I've just been reviewing these patches and have spotted an error in the
file mm/slob.c at lines 500-501 whereby a non existent variable "c" is
referenced. The attached patch is a proposed fix to the problem.

--
Peter Williams pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce

[-- Attachment #2: fix-slob-error.patch --]
[-- Type: text/x-patch, Size: 1346 bytes --]

Fix error in realtime-preempt patch for mm/slob.c

This error was caused by a change to slob_free()'s interface.

Signed-off-by: Peter Williams <pwil3058@bigpond.net.au>

diff -r cb0010b7bffe mm/slob.c
--- a/mm/slob.c Fri Jul 13 15:24:45 2007 +1000
+++ b/mm/slob.c Fri Jul 13 16:23:02 2007 +1000
@@ -493,14 +493,14 @@ void *kmem_cache_zalloc(struct kmem_cach
}
EXPORT_SYMBOL(kmem_cache_zalloc);

-static void __kmem_cache_free(void *b, int size)
+static void __kmem_cache_free(struct kmem_cache *c, void *b)
{
atomic_dec(&c->items);

if (c->size <= MAX_SLOB_CACHE_SIZE)
slob_free(c, b, c->size);
else
- free_pages((unsigned long)b, get_order(size));
+ free_pages((unsigned long)b, get_order(c->size));
}

static void kmem_rcu_free(struct rcu_head *head)
@@ -508,7 +508,7 @@ static void kmem_rcu_free(struct rcu_hea
struct slob_rcu *slob_rcu = (struct slob_rcu *)head;
void *b = (void *)slob_rcu - (slob_rcu->size - sizeof(struct slob_rcu));

- __kmem_cache_free(b, slob_rcu->size);
+ __kmem_cache_free(slob_rcu, b);
}

void kmem_cache_free(struct kmem_cache *c, void *b)
@@ -520,7 +520,7 @@ void kmem_cache_free(struct kmem_cache *
slob_rcu->size = c->size;
call_rcu(&slob_rcu->head, kmem_rcu_free);
} else {
- __kmem_cache_free(b, c->size);
+ __kmem_cache_free(c, b);
}
}
EXPORT_SYMBOL(kmem_cache_free);