Date: Wed, 1 Sep 2010 09:47:56 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r212085 - projects/sv/sys/net Message-ID: <201009010947.o819lu9N057842@svn.freebsd.org>
index | next in thread | raw e-mail
Author: attilio Date: Wed Sep 1 09:47:56 2010 New Revision: 212085 URL: http://svn.freebsd.org/changeset/base/212085 Log: We don't need to stop the CPUs: - If we entered the debugger via a panic breakpoint() already did that - If we are running a reboot(2) instance with RB_DUMP it is not due Modified: projects/sv/sys/net/netdump_client.c Modified: projects/sv/sys/net/netdump_client.c ============================================================================== --- projects/sv/sys/net/netdump_client.c Wed Sep 1 08:32:40 2010 (r212084) +++ projects/sv/sys/net/netdump_client.c Wed Sep 1 09:47:56 2010 (r212085) @@ -1157,10 +1157,7 @@ netdump_trigger(void *arg, int howto) uint8_t broken_state[NETDUMP_BROKEN_STATE_BUFFER_SIZE]; void (*old_if_input)(struct ifnet *, struct mbuf *)=NULL; int error; -#ifdef SMP - u_int cpumap=0; -#endif - + if ((howto&(RB_HALT|RB_DUMP))!=RB_DUMP || !nd_enable || cold || dumping) return; @@ -1190,34 +1187,6 @@ netdump_trigger(void *arg, int howto) /***** Beyond this point, don't return: goto abort *****/ - /* Stop all the other CPUs */ -#ifdef SMP - if (smp_active != 0) { - printf("netdump_trigger called on cpu#%d\n", PCPU_GET(cpuid)); - - cpumap = PCPU_GET(other_cpus) & ~ stopped_cpus; - if (cpumap != 0) { - unsigned long long end_ts; - - printf("netdump_trigger: Stopping other CPUs\n"); - - /* 1 second */ - end_ts = rdtsc() + 1ULL * tsc_freq; - - ipi_selected(cpumap, IPI_STOP); - - while ((atomic_load_acq_int(&stopped_cpus) & cpumap) - != cpumap) { - if (rdtsc() > end_ts) { - printf("netdump_trigger: Stopping other" - "CPUs timed out. Continuing " - "anyway.\n"); - break; - } - } - } - } -#endif bzero(broken_state, sizeof(broken_state)); error = nd_nic->if_netdump->break_lock(nd_nic, &broke_lock, broken_state, sizeof(broken_state)); @@ -1290,11 +1259,6 @@ cleanup: /* Even if we broke the lock, this seems like the most sane thing to * do */ nd_nic->if_netdump->release_lock(nd_nic); -#ifdef SMP - if (cpumap) { - restart_cpus(cpumap); - } -#endif dumping--; }help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009010947.o819lu9N057842>
