On Wed, 2006-12-20 at 11:16 -0800, Tim Nguyen wrote:

The SMP problem has been a pain in the butt for a long time
with the SF kgdb patch. I've been disabling SMP on 2.6.12
to avoid it.

I'm having problems with the 2.6.12 patch on VmWare were
it looks like a hang in this area but you fix didn't help.
I'm still investigating the problem. Does the patch even
work with SMP un-configured? Might be requirement for LOCAL_APIC.
Seems like it would be simpler for non-SMP to skip the NMI IPI
and the waiting for other processors. Whats the point?

I was wondering with you fix why it's necessary to increase
the premption count by HARDIRQ_OFFSET.

Also I don't know why IRQ_EXIT_OFFSET can be one off of HARDIRQ_OFFSET.

-piet

> Well it turns out that retrying the NMI_IPI is not a good idea.  This
> **final** patch presents the minimal changes needed to address the
> issues previously stated and supersedes all previous postings.  BTW this
> was derived from the trini's linux-2.6-kgdb-testing tree:
> 
> diff --git a/kernel/kgdb.c b/kernel/kgdb.c
> index a60550f..394ab61 100644
> --- a/kernel/kgdb.c
> +++ b/kernel/kgdb.c
> @@ -901,9 +901,11 @@ int kgdb_handle_exception(int ex_vector,
>  
>       kgdb_disable_hw_debug(linux_regs);
>  
> -     if (!debugger_step || !kgdb_contthread)
> +     if (!debugger_step || !kgdb_contthread) {
> +             add_preempt_count(HARDIRQ_OFFSET);
>               for (i = 0; i < NR_CPUS; i++)
>                       spin_lock(&slavecpulocks[i]);
> +     }
>  
>  #ifdef CONFIG_SMP
>       /* Make sure we get the other CPUs */
> @@ -1367,6 +1369,7 @@ int kgdb_handle_exception(int ex_vector,
>                                       cpu_relax();
>                       }
>               }
> +             sub_preempt_count(IRQ_EXIT_OFFSET);
>       }
>  
>  #ifdef CONFIG_SMP
> diff --git a/kernel/timer.c b/kernel/timer.c
> index 1d7dd62..4c3e7d2 100644
> --- a/kernel/timer.c
> +++ b/kernel/timer.c
> @@ -34,6 +34,7 @@
>  #include <linux/cpu.h>
>  #include <linux/syscalls.h>
>  #include <linux/delay.h>
> +#include <linux/kgdb.h>
>  
>  #include <asm/uaccess.h>
>  #include <asm/unistd.h>
> @@ -1176,6 +1177,10 @@ void update_process_times(int user_tick)
>       struct task_struct *p = current;
>       int cpu = smp_processor_id();
>  
> +#ifdef CONFIG_KGDB
> +     if (atomic_read(&cpu_doing_single_step) == cpu)
> +             return;
> +#endif
>       /* Note: this timer irq context must be accounted for as well.
> */
>       if (user_tick)
>               account_user_time(p, jiffies_to_cputime(1));
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Kgdb-bugreport mailing list
> Kgdb-bugreport@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport
-- 
Piet Delaney                                    Phone: (408) 200-5256
Blue Lane Technologies                          Fax:   (408) 200-5299
10450 Bubb Rd.
Cupertino, Ca. 95014                            Email: [EMAIL PROTECTED]

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Kgdb-bugreport mailing list
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to