RE: Kernel Preemptible patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > Hi Everybody, Can anybody please brief me about the preemptible
> > patch implemented by Robert love 's. Thanks in advance.  Rahul.

snip

> Do you really need to be briefed?

Depending on the architecture, there could be some explaining or further
investigation required. I have attached an email from one of the PPC
mail-lists which describes patches to the patches. If you are working on an
x86 architecture, this stuff usually isn't an issue. If you are working on
something else it would be a good idea to find the appropriate development
groups.
--- Begin Message ---
Joakim,

At 12:35 PM 12/12/2002, you wrote:
>Was that the 2.4.19-2 patch? What were the bugs and have you fixed them?

I had the following issues with 2.4.19-2 (2.4.20-1 is identical in this
regard):

1) arch/ppc/kernel.entry.S

diff -urN linux-2.4.20/arch/ppc/kernel/entry.S linux/arch/ppc/kernel/entry.S
--- linux-2.4.20/arch/ppc/kernel/entry.S        2002-11-28
18:53:11.000000000 -0500
+++ linux/arch/ppc/kernel/entry.S       2002-12-11 02:34:47.000000000 -0500
@@ -278,6 +278,41 @@
          */
         cmpi    0,r3,0
         beq     restore
+#ifdef CONFIG_PREEMPT
+       lwz     r3,PREEMPT_COUNT(r2)
+       cmpi    0,r3,1
+       bge     ret_from_except
+       lwz     r5,_MSR(r1)
+       andi.   r5,r5,MSR_PR
+       bne     do_signal_ret

     <rest of the diff is skipped>

I had to change the last command to "bne ret_from_except".
I checked MontaVista tree, and they have "ret_from_except" there also.

Without this change trivial code:

   while (true) ;

locked the box completely.

2) include/asm-ppc/pgalloc.h  There are curly brackets missing in
get_pgd_fast()

3) to support 440GP you have to modify
arc/ppc/kernel/irc.c:preempt_intercept:

#if !defined(CONFIG_4xx) || defined(CONFIG_440)
         case 0x900:
#else
         case 0x1000:
#endif

With these changes (an maybe some others I forgot to mention here :),
I have pretty stable preemptable kernel (2.4.19, PPC440GP & 405GP, also
with rtsched patch by George Anzinger)

Thanks,


  Eugene Surovegin <mailto:ebs@innocent.com>


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

--- End Message ---

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux