svn commit: r212993 - head/sys/dev/acpica
Author: avg Date: Wed Sep 22 06:10:22 2010 New Revision: 212993 URL: http://svn.freebsd.org/changeset/base/212993 Log: acpi_attach: do not explicitly install default handlers for default address spaces There has been no need to do that starting with ACPICA 20040427 as AcpiEnableSubsystem() installs the handlers automatically. Additionaly, explicitly calling AcpiInstallAddressSpaceHandler before AcpiEnableSubsystem is not supported by ACPICA and leads to too early execution of _REG methods in some DSDTs, which may result in problems. Big thanks to Robert Moore of ACPICA/Intel for explaining the above. Reported by: Daniel Bilik daniel.bi...@neosystem.cz Tested by:Daniel Bilik daniel.bi...@neosystem.cz Reviewed by: jkim Suggested by: Moore, Robert robert.mo...@intel.com MFC after:1 week Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c == --- head/sys/dev/acpica/acpi.c Wed Sep 22 05:32:37 2010(r212992) +++ head/sys/dev/acpica/acpi.c Wed Sep 22 06:10:22 2010(r212993) @@ -494,29 +494,6 @@ acpi_attach(device_t dev) acpi_enable_pcie(); #endif -/* Install the default address space handlers. */ -status = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT, - ACPI_ADR_SPACE_SYSTEM_MEMORY, ACPI_DEFAULT_HANDLER, NULL, NULL); -if (ACPI_FAILURE(status)) { - device_printf(dev, Could not initialise SystemMemory handler: %s\n, - AcpiFormatException(status)); - goto out; -} -status = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT, - ACPI_ADR_SPACE_SYSTEM_IO, ACPI_DEFAULT_HANDLER, NULL, NULL); -if (ACPI_FAILURE(status)) { - device_printf(dev, Could not initialise SystemIO handler: %s\n, - AcpiFormatException(status)); - goto out; -} -status = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT, - ACPI_ADR_SPACE_PCI_CONFIG, ACPI_DEFAULT_HANDLER, NULL, NULL); -if (ACPI_FAILURE(status)) { - device_printf(dev, could not initialise PciConfig handler: %s\n, - AcpiFormatException(status)); - goto out; -} - /* * Note that some systems (specifically, those with namespace evaluation * issues that require the avoidance of parts of the namespace) must ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r212994 - head/sys/kern
Author: avg Date: Wed Sep 22 06:45:07 2010 New Revision: 212994 URL: http://svn.freebsd.org/changeset/base/212994 Log: kdb_backtrace: use stack_print_ddb instead of stack_print This is a followup to r212964. stack_print call chain obtains linker sx lock and thus potentially may lead to a deadlock depending on a kind of a panic. stack_print_ddb doesn't acquire any locks and it doesn't use any facilities of ddb backend. Using stack_print_ddb outside of DDB ifdef required taking a number of helper functions from under it as well. It is a good idea to rename linker_ddb_* and stack_*_ddb functions to have 'unlocked' component in their name instead of 'ddb', because those functions do not use any DDB services, but instead they provide unlocked access to linker symbol information. The latter was previously needed only for DDB, hence the 'ddb' name component. Alternative is to ditch unlocked versions altogether after implementing proper panic handling: 1. stop other cpus upon a panic 2. make all non-spinlock lock operations (mutex, sx, rwlock) be a no-op when panicstr != NULL Suggested by: mdf Discussed with: attilio MFC after:2 weeks Modified: head/sys/kern/kern_linker.c head/sys/kern/subr_kdb.c head/sys/kern/subr_stack.c Modified: head/sys/kern/kern_linker.c == --- head/sys/kern/kern_linker.c Wed Sep 22 06:10:22 2010(r212993) +++ head/sys/kern/kern_linker.c Wed Sep 22 06:45:07 2010(r212994) @@ -924,7 +924,6 @@ linker_debug_search_symbol_name(caddr_t return (0); } -#ifdef DDB /* * DDB Helpers. DDB has to look across multiple files with their own symbol * tables and string tables. @@ -933,12 +932,14 @@ linker_debug_search_symbol_name(caddr_t * DDB to hang because somebody's got the lock held. We'll take the chance * that the files list is inconsistant instead. */ +#ifdef DDB int linker_ddb_lookup(const char *symstr, c_linker_sym_t *sym) { return (linker_debug_lookup(symstr, sym)); } +#endif int linker_ddb_search_symbol(caddr_t value, c_linker_sym_t *sym, long *diffp) @@ -961,7 +962,6 @@ linker_ddb_search_symbol_name(caddr_t va return (linker_debug_search_symbol_name(value, buf, buflen, offset)); } -#endif /* * stack(9) helper for non-debugging environemnts. Unlike DDB helpers, we do Modified: head/sys/kern/subr_kdb.c == --- head/sys/kern/subr_kdb.cWed Sep 22 06:10:22 2010(r212993) +++ head/sys/kern/subr_kdb.cWed Sep 22 06:45:07 2010(r212994) @@ -308,7 +308,7 @@ kdb_backtrace(void) printf(KDB: stack backtrace:\n); stack_save(st); - stack_print(st); + stack_print_ddb(st); } #endif } Modified: head/sys/kern/subr_stack.c == --- head/sys/kern/subr_stack.c Wed Sep 22 06:10:22 2010(r212993) +++ head/sys/kern/subr_stack.c Wed Sep 22 06:45:07 2010(r212994) @@ -44,9 +44,7 @@ static MALLOC_DEFINE(M_STACK, stack, static int stack_symbol(vm_offset_t pc, char *namebuf, u_int buflen, long *offset); -#ifdef DDB static int stack_symbol_ddb(vm_offset_t pc, const char **name, long *offset); -#endif struct stack * stack_create(void) @@ -125,7 +123,6 @@ stack_print_short(struct stack *st) printf(\n); } -#ifdef DDB void stack_print_ddb(struct stack *st) { @@ -141,6 +138,7 @@ stack_print_ddb(struct stack *st) } } +#ifdef DDB void stack_print_short_ddb(struct stack *st) { @@ -255,7 +253,6 @@ stack_symbol(vm_offset_t pc, char *nameb return (0); } -#ifdef DDB static int stack_symbol_ddb(vm_offset_t pc, const char **name, long *offset) { @@ -275,4 +272,3 @@ stack_symbol_ddb(vm_offset_t pc, const c *name = ??; return (ENOENT); } -#endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r212997 - head/sys/dev/acpica
Author: mav Date: Wed Sep 22 11:32:22 2010 New Revision: 212997 URL: http://svn.freebsd.org/changeset/base/212997 Log: Quick fix for unmotivated C2 state usage during boot, introduced at r212541. That caused LAPIC timer failure and huge delays during boot on some systems. Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c == --- head/sys/dev/acpica/acpi_cpu.c Wed Sep 22 10:55:33 2010 (r212996) +++ head/sys/dev/acpica/acpi_cpu.c Wed Sep 22 11:32:22 2010 (r212997) @@ -894,7 +894,7 @@ acpi_cpu_idle() cx_next_idx = 0; #ifndef __ia64__ if (cpu_disable_deep_sleep) - i = sc-cpu_non_c3; + i = min(sc-cpu_cx_lowest, sc-cpu_non_c3); else #endif i = sc-cpu_cx_lowest; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r212998 - head/sys/sparc64/sparc64
Author: kib Date: Wed Sep 22 12:52:12 2010 New Revision: 212998 URL: http://svn.freebsd.org/changeset/base/212998 Log: For sparc64 relocations that directly put bits of the symbol value into the location, apply elf_relocaddr to the symbol value to have right values for the symbols from dpcpu segment. PR: kern/147769 Discussed with: avg Tested by:marius MFC after:2 weeks Modified: head/sys/sparc64/sparc64/elf_machdep.c Modified: head/sys/sparc64/sparc64/elf_machdep.c == --- head/sys/sparc64/sparc64/elf_machdep.c Wed Sep 22 11:32:22 2010 (r212997) +++ head/sys/sparc64/sparc64/elf_machdep.c Wed Sep 22 12:52:12 2010 (r212998) @@ -155,6 +155,7 @@ elf64_dump_thread(struct thread *td __un #define _RF_G 0x1000 /* GOT offset */ #define _RF_B 0x0800 /* Load address relative */ #define _RF_U 0x0400 /* Unaligned */ +#define_RF_X 0x0200 /* Bare symbols, needs proc */ #define _RF_SZ(s) (((s) 0xff) 8) /* memory target size */ #define _RF_RS(s) ( (s) 0xff) /* right shift */ static const int reloc_target_flags[] = { @@ -167,10 +168,10 @@ static const int reloc_target_flags[] = _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(0), /* DISP_32 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(2), /* WDISP_30 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(2), /* WDISP_22 */ - _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(10),/* HI22 */ - _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* 22 */ - _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* 13 */ - _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* LO10 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(10),/* HI22 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* 22 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* 13 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* LO10 */ _RF_G| _RF_SZ(32) | _RF_RS(0), /* GOT10 */ _RF_G| _RF_SZ(32) | _RF_RS(0), /* GOT13 */ _RF_G| _RF_SZ(32) | _RF_RS(10),/* GOT22 */ @@ -189,29 +190,29 @@ static const int reloc_target_flags[] = _RF_A|_RF_P| _RF_SZ(32) | _RF_RS(0), /* PCPLT32 */ _RF_A|_RF_P| _RF_SZ(32) | _RF_RS(10),/* PCPLT22 */ _RF_A|_RF_P| _RF_SZ(32) | _RF_RS(0), /* PCPLT10 */ - _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* 10 */ - _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* 11 */ - _RF_S|_RF_A|_RF_SZ(64) | _RF_RS(0), /* 64 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* 10 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* 11 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(64) | _RF_RS(0), /* 64 */ _RF_S|_RF_A|/*extra*/ _RF_SZ(32) | _RF_RS(0), /* OLO10 */ - _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(42),/* HH22 */ - _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(32),/* HM10 */ - _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(10),/* LM22 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(42),/* HH22 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(32),/* HM10 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(10),/* LM22 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(42),/* PC_HH22 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(32),/* PC_HM10 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(10),/* PC_LM22 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(2), /* WDISP16 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(2), /* WDISP19 */ _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* GLOB_JMP */ - _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* 7 */ - _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* 5 */ - _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* 6 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* 7 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* 5 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* 6 */ _RF_S|_RF_A|_RF_P| _RF_SZ(64) | _RF_RS(0), /* DISP64 */ _RF_A|_RF_SZ(64) | _RF_RS(0), /* PLT64 */ - _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(10),/* HIX22 */ - _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* LOX10 */ - _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(22),/* H44 */ - _RF_S|_RF_A|
Re: svn commit: r212964 - head/sys/kern
On Tue, 2010-09-21 at 15:07 +, Andriy Gapon wrote: Author: avg Date: Tue Sep 21 15:07:44 2010 New Revision: 212964 URL: http://svn.freebsd.org/changeset/base/212964 Log: kdb_backtrace: stack(9)-based code to print backtrace without any backend The idea is to add KDB and KDB_TRACE options to GENERIC kernels on stable branches, so that at least the minimal information is produced for non-specific panics like traps on page faults. The GENERICs in stable branches seem to already include STACK option. Ignoring the rest of the discussion about locking, I think this is a step in the right direction. However, what I feel we should be strongly considering is for textdumps to be enabled by default on release media. As more groups choose to use the kernels from the release media (PC-BSD, FreeNAS, etc) and put them into places where end users are never expected to recompile kernels, having textdumps enabled by default in RELEASE kernels becomes a bigger and bigger priority. Groups like PC-BSD don't necessarily have the time or skills to do the needed kernel debugging (and nor should they have to, it's not their purpose), so anything we can do in releases to make sure we have enough info to resolve panics seen by their users is a big bonus. Is there any real reason why we shouldn't go down this route? Thanks, Gavin -- Gavin Atkinson FreeBSD committer and bugmeister GPG: A093262B (313A A79F 697D 3A5C 216A EDF5 935D EF44 A093 262B) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r212964 - head/sys/kern
on 22/09/2010 16:46 Gavin Atkinson said the following: Ignoring the rest of the discussion about locking, I think this is a step in the right direction. However, what I feel we should be strongly considering is for textdumps to be enabled by default on release media. As more groups choose to use the kernels from the release media (PC-BSD, FreeNAS, etc) and put them into places where end users are never expected to recompile kernels, having textdumps enabled by default in RELEASE kernels becomes a bigger and bigger priority. Groups like PC-BSD don't necessarily have the time or skills to do the needed kernel debugging (and nor should they have to, it's not their purpose), so anything we can do in releases to make sure we have enough info to resolve panics seen by their users is a big bonus. Is there any real reason why we shouldn't go down this route? textdumps need DDB. textdumps also need dumpdev which is not enabled by default in /etc/defaults/rc.conf, but that's easier to fix for any individual user or a FreeBSD distribution. I originally suggested to include DDB in the stable GENERICs. But that has a number of consequences: 1. With DDB a panic results in a system going to ddb prompt instead of rebooting, unless KDB_UNATTENDED is also specified. System not rebooting on panic may be a POLA violation and an inconvenience. However, a user can change this using debug.debugger_on_panic=0 sysctl. Although, sysctl time might be too late in some cases, not sure. 2. Adding KDB_UNATTENDED to GENERIC may have unexpected effect for users that include GENERIC in their kernel config and then extend/trim it with local directives. So another possible POLA violation. Again, fixable by debug.debugger_on_panic=1 with all the howevers and althoughs. For me personally, the significant benefits outweigh possible minor/temporary inconveniences and surprises, but this opinion is not shared by all developers. Really besides the point, but such FreeBSD distributions like FreeNAS and PC-BSD can really use their own kernel config, they don't have to use the same GENERICs. P.S. I think that it would have been better if you followed up to my proposal on a...@. -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r212999 - head/sys/sys
Author: jhb Date: Wed Sep 22 15:10:03 2010 New Revision: 212999 URL: http://svn.freebsd.org/changeset/base/212999 Log: Copy td_rqindex during fork instead of zero'ing it to match the comments. I do not believe there is any functional change. Modified: head/sys/sys/proc.h Modified: head/sys/sys/proc.h == --- head/sys/sys/proc.h Wed Sep 22 12:52:12 2010(r212998) +++ head/sys/sys/proc.h Wed Sep 22 15:10:03 2010(r212999) @@ -263,7 +263,7 @@ struct thread { int td_ng_outbound; /* (k) Thread entered ng from above. */ struct osd td_osd; /* (k) Object specific data. */ struct vm_map_entry *td_map_def_user; /* (k) Deferred entries. */ -#definetd_endzero td_base_pri +#definetd_endzero td_rqindex /* Copied during fork1() or thread_sched_upcall(). */ #definetd_startcopy td_endzero ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r212964 - head/sys/kern
On Wed, 2010-09-22 at 17:43 +0300, Andriy Gapon wrote: on 22/09/2010 16:46 Gavin Atkinson said the following: Ignoring the rest of the discussion about locking, I think this is a step in the right direction. However, what I feel we should be strongly considering is for textdumps to be enabled by default on release media. As more groups choose to use the kernels from the release media (PC-BSD, FreeNAS, etc) and put them into places where end users are never expected to recompile kernels, having textdumps enabled by default in RELEASE kernels becomes a bigger and bigger priority. Groups like PC-BSD don't necessarily have the time or skills to do the needed kernel debugging (and nor should they have to, it's not their purpose), so anything we can do in releases to make sure we have enough info to resolve panics seen by their users is a big bonus. Is there any real reason why we shouldn't go down this route? textdumps need DDB. textdumps also need dumpdev which is not enabled by default in /etc/defaults/rc.conf, but that's easier to fix for any individual user or a FreeBSD distribution. Indeed, I was happy to see dumpdev enabled on 7.x, and disappointed to see it disabled on 8.x. I originally suggested to include DDB in the stable GENERICs. But that has a number of consequences: 1. With DDB a panic results in a system going to ddb prompt instead of rebooting, unless KDB_UNATTENDED is also specified. System not rebooting on panic may be a POLA violation and an inconvenience. However, a user can change this using debug.debugger_on_panic=0 sysctl. Although, sysctl time might be too late in some cases, not sure. Indeed, if we went down this route we would have to make sure that the existing behaviour of rebooting is preserved. We'd also have to ensure Ctrl-Alt-Escape doesn't drop to the debugger on release media. For me personally, the significant benefits outweigh possible minor/temporary inconveniences and surprises, but this opinion is not shared by all developers. I (and I suspect any of the other people on the PR database frontline) would probably support this :) Really besides the point, but such FreeBSD distributions like FreeNAS and PC-BSD can really use their own kernel config, they don't have to use the same GENERICs. Indeed, although in some ways they shouldn't have to. Having textdumps enabled by default would also be a huge win for us, of course. P.S. I think that it would have been better if you followed up to my proposal on a...@. I'm not subscribed to -arch at the moment, I probably should be. I guess you're talking about the thread in June? I wish I'd seen that at the time, I'm 100% in favour of it. Gavin -- Gavin Atkinson FreeBSD committer and bugmeister GPG: A093262B (313A A79F 697D 3A5C 216A EDF5 935D EF44 A093 262B) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r212964 - head/sys/kern
on 22/09/2010 18:23 Gavin Atkinson said the following: I'm not subscribed to -arch at the moment, I probably should be. I guess you're talking about the thread in June? I wish I'd seen that at the time, I'm 100% in favour of it. No, a thread in September, third decade of it :) -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213000 - head/sys/dev/stge
Author: yongari Date: Wed Sep 22 16:48:24 2010 New Revision: 213000 URL: http://svn.freebsd.org/changeset/base/213000 Log: Fix build breakage introduced in r212972. Modified: head/sys/dev/stge/if_stge.c Modified: head/sys/dev/stge/if_stge.c == --- head/sys/dev/stge/if_stge.c Wed Sep 22 15:10:03 2010(r212999) +++ head/sys/dev/stge/if_stge.c Wed Sep 22 16:48:24 2010(r213000) @@ -1944,13 +1944,11 @@ stge_poll(struct ifnet *ifp, enum poll_c Host interface error, resetting...\n); ifp-if_drv_flags = ~IFF_DRV_RUNNING; stge_init_locked(sc); - break; } if ((status IS_TxComplete) != 0) { if (stge_tx_error(sc) != 0) { ifp-if_drv_flags = ~IFF_DRV_RUNNING; stge_init_locked(sc); - break; } } } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213001 - in head: share/misc usr.bin/calendar/calendars
Author: sunpoet (ports committer) Date: Wed Sep 22 16:54:22 2010 New Revision: 213001 URL: http://svn.freebsd.org/changeset/base/213001 Log: Add myself as a ports committer Approved by: pgollucci (mentor) Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot == --- head/share/misc/committers-ports.dotWed Sep 22 16:48:24 2010 (r213000) +++ head/share/misc/committers-ports.dotWed Sep 22 16:54:22 2010 (r213001) @@ -154,6 +154,7 @@ skreuzer [label=Steven Kreuzer\nskreuze sobomax[label=Maxim sobolev\nsobo...@freebsd.org\n2000/05/17] stas [label=Stanislav sedov\ns...@freebsd.org\n2006/09/18] stefan [label=Stefan walter\nste...@freebsd.org\n2006/05/07] +sunpoet [label=Po-Chuan hsieh\nsunp...@freebsd.org\n2010/09/21] swills [label=Steve wills\nswi...@freebsd.org\n2010/09/03] tabthorpe [label=Thomas abthorpe\ntabtho...@freebsd.org\n2007/08/20] tdb [label=Tim bishop\n...@freebsd.org\n2005/11/30] @@ -332,6 +333,7 @@ pav - mnag pgj - ashish pgj - jacula +pgollucci - sunpoet pgollucci - swills philip - koitsu Modified: head/usr.bin/calendar/calendars/calendar.freebsd == --- head/usr.bin/calendar/calendars/calendar.freebsdWed Sep 22 16:48:24 2010(r213000) +++ head/usr.bin/calendar/calendars/calendar.freebsdWed Sep 22 16:54:22 2010(r213001) @@ -105,6 +105,7 @@ 03/27 Josef El-Rayes jo...@freebsd.org born in Linz, Austria, 1982 03/28 Sean C. Farley s...@freebsd.org born in Indianapolis, Indiana, United States, 1970 03/29 Thierry Thomas thie...@freebsd.org born in Luxeuil les Bains, France, 1961 +03/30 Po-Chuan Hsieh sunp...@freebsd.org born in Taipei, Taiwan, Republic of China, 1978 04/01 Matthew Jacob mja...@freebsd.org born in San Francisco, California, United States, 1958 04/01 Bill Fenner fen...@freebsd.org born in Bellefonte, Pennsylvania, United States, 1971 04/01 Peter Edwards pea...@freebsd.org born in Dublin, Ireland, 1973 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213003 - head/sbin/hastd
Author: pjd Date: Wed Sep 22 18:38:02 2010 New Revision: 213003 URL: http://svn.freebsd.org/changeset/base/213003 Log: Sort includes. MFC after:3 days Modified: head/sbin/hastd/control.c Modified: head/sbin/hastd/control.c == --- head/sbin/hastd/control.c Wed Sep 22 18:00:34 2010(r213002) +++ head/sbin/hastd/control.c Wed Sep 22 18:38:02 2010(r213003) @@ -32,11 +32,11 @@ __FBSDID($FreeBSD$); #include sys/types.h #include sys/wait.h -#include signal.h #include assert.h #include errno.h #include pthread.h +#include signal.h #include stdio.h #include string.h ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213004 - head/sbin/hastd
Author: pjd Date: Wed Sep 22 18:39:43 2010 New Revision: 213004 URL: http://svn.freebsd.org/changeset/base/213004 Log: If we are unable to receive control message is most likely because the main process died. Instead of entering infinite loop, terminate. MFC after:3 days Modified: head/sbin/hastd/control.c Modified: head/sbin/hastd/control.c == --- head/sbin/hastd/control.c Wed Sep 22 18:38:02 2010(r213003) +++ head/sbin/hastd/control.c Wed Sep 22 18:39:43 2010(r213004) @@ -387,7 +387,8 @@ ctrl_thread(void *arg) pthread_exit(NULL); pjdlog_errno(LOG_ERR, Unable to receive control message); - continue; + kill(getpid(), SIGTERM); + pthread_exit(NULL); } cmd = nv_get_uint8(nvin, cmd); if (cmd == 0) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213006 - head/sbin/hastd
Author: pjd Date: Wed Sep 22 18:57:06 2010 New Revision: 213006 URL: http://svn.freebsd.org/changeset/base/213006 Log: Fix descriptor leaks: when child exits, we have to close control and event socket pairs. We did that only in one case out of three. MFC after:3 days Modified: head/sbin/hastd/control.c head/sbin/hastd/control.h head/sbin/hastd/hastd.c Modified: head/sbin/hastd/control.c == --- head/sbin/hastd/control.c Wed Sep 22 18:46:17 2010(r213005) +++ head/sbin/hastd/control.c Wed Sep 22 18:57:06 2010(r213006) @@ -39,6 +39,7 @@ __FBSDID($FreeBSD$); #include signal.h #include stdio.h #include string.h +#include unistd.h #include hast.h #include hastd.h @@ -51,6 +52,17 @@ __FBSDID($FreeBSD$); #include control.h +void +child_cleanup(struct hast_resource *res) +{ + + proto_close(res-hr_ctrl); + res-hr_ctrl = NULL; + proto_close(res-hr_event); + res-hr_event = NULL; + res-hr_workerpid = 0; +} + static void control_set_role_common(struct hastd_config *cfg, struct nv *nvout, uint8_t role, struct hast_resource *res, const char *name, unsigned int no) @@ -109,7 +121,7 @@ control_set_role_common(struct hastd_con pjdlog_debug(1, Worker process %u stopped., (unsigned int)res-hr_workerpid); } - res-hr_workerpid = 0; + child_cleanup(res); } /* Start worker process if we are changing to primary. */ Modified: head/sbin/hastd/control.h == --- head/sbin/hastd/control.h Wed Sep 22 18:46:17 2010(r213005) +++ head/sbin/hastd/control.h Wed Sep 22 18:57:06 2010(r213006) @@ -38,6 +38,8 @@ struct hastd_config; struct hast_resource; +void child_cleanup(struct hast_resource *res); + void control_set_role(struct hast_resource *res, uint8_t role); void control_handle(struct hastd_config *cfg); Modified: head/sbin/hastd/hastd.c == --- head/sbin/hastd/hastd.c Wed Sep 22 18:46:17 2010(r213005) +++ head/sbin/hastd/hastd.c Wed Sep 22 18:57:06 2010(r213006) @@ -158,13 +158,7 @@ child_exit(void) pjdlog_prefix_set([%s] (%s) , res-hr_name, role2str(res-hr_role)); child_exit_log(pid, status); - proto_close(res-hr_ctrl); - res-hr_ctrl = NULL; - if (res-hr_event != NULL) { - proto_close(res-hr_event); - res-hr_event = NULL; - } - res-hr_workerpid = 0; + child_cleanup(res); if (res-hr_role == HAST_ROLE_PRIMARY) { /* * Restart child process if it was killed by signal @@ -553,7 +547,7 @@ listen_accept(void) } else { child_exit_log(res-hr_workerpid, status); } - res-hr_workerpid = 0; + child_cleanup(res); } else if (res-hr_remotein != NULL) { char oaddr[256]; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213007 - head/sbin/hastd
Author: pjd Date: Wed Sep 22 19:03:11 2010 New Revision: 213007 URL: http://svn.freebsd.org/changeset/base/213007 Log: Fix possible deadlock where worker process sends an event to the main process while the main process sends control message to the worker process, but worker process hasn't started control thread yet, because it waits for reply from the main process. The fix is to start the control thread before sending any events. Reported and fix suggested by:Mikolaj Golub to.my.troc...@gmail.com MFC after:3 days Modified: head/sbin/hastd/primary.c head/sbin/hastd/secondary.c Modified: head/sbin/hastd/primary.c == --- head/sbin/hastd/primary.c Wed Sep 22 18:57:06 2010(r213006) +++ head/sbin/hastd/primary.c Wed Sep 22 19:03:11 2010(r213007) @@ -807,10 +807,20 @@ hastd_primary(struct hast_resource *res) proto_send(res-hr_event, NULL, 0); init_local(res); - if (real_remote(res) init_remote(res, NULL, NULL)) - sync_start(); init_ggate(res); init_environment(res); + /* +* Create the control thread before sending any event to the parent, +* as we can deadlock when parent sends control request to worker, +* but worker has no control thread started yet, so parent waits. +* In the meantime worker sends an event to the parent, but parent +* is unable to handle the event, because it waits for control +* request response. +*/ + error = pthread_create(td, NULL, ctrl_thread, res); + assert(error == 0); + if (real_remote(res) init_remote(res, NULL, NULL)) + sync_start(); error = pthread_create(td, NULL, ggate_recv_thread, res); assert(error == 0); error = pthread_create(td, NULL, local_send_thread, res); @@ -823,8 +833,6 @@ hastd_primary(struct hast_resource *res) assert(error == 0); error = pthread_create(td, NULL, sync_thread, res); assert(error == 0); - error = pthread_create(td, NULL, ctrl_thread, res); - assert(error == 0); (void)guard_thread(res); } Modified: head/sbin/hastd/secondary.c == --- head/sbin/hastd/secondary.c Wed Sep 22 18:57:06 2010(r213006) +++ head/sbin/hastd/secondary.c Wed Sep 22 19:03:11 2010(r213007) @@ -393,17 +393,27 @@ hastd_secondary(struct hast_resource *re pjdlog_errno(LOG_WARNING, Unable to set connection timeout); init_local(res); - init_remote(res, nvin); init_environment(); + + /* +* Create the control thread before sending any event to the parent, +* as we can deadlock when parent sends control request to worker, +* but worker has no control thread started yet, so parent waits. +* In the meantime worker sends an event to the parent, but parent +* is unable to handle the event, because it waits for control +* request response. +*/ + error = pthread_create(td, NULL, ctrl_thread, res); + assert(error == 0); + + init_remote(res, nvin); event_send(res, EVENT_CONNECT); error = pthread_create(td, NULL, recv_thread, res); assert(error == 0); error = pthread_create(td, NULL, disk_thread, res); assert(error == 0); - error = pthread_create(td, NULL, send_thread, res); - assert(error == 0); - (void)ctrl_thread(res); + (void)send_thread(res); } static void ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213008 - head/sbin/hastd
Author: pjd Date: Wed Sep 22 19:05:54 2010 New Revision: 213008 URL: http://svn.freebsd.org/changeset/base/213008 Log: Assert that descriptor numbers are sane. MFC after:3 days Modified: head/sbin/hastd/hastd.c Modified: head/sbin/hastd/hastd.c == --- head/sbin/hastd/hastd.c Wed Sep 22 19:03:11 2010(r213007) +++ head/sbin/hastd/hastd.c Wed Sep 22 19:05:54 2010(r213008) @@ -650,18 +650,22 @@ main_loop(void) /* Setup descriptors for select(2). */ FD_ZERO(rfds); maxfd = fd = proto_descriptor(cfg-hc_controlconn); + assert(fd = 0); FD_SET(fd, rfds); fd = proto_descriptor(cfg-hc_listenconn); + assert(fd = 0); FD_SET(fd, rfds); maxfd = fd maxfd ? fd : maxfd; TAILQ_FOREACH(res, cfg-hc_resources, hr_next) { if (res-hr_event == NULL) continue; fd = proto_descriptor(res-hr_event); + assert(fd = 0); FD_SET(fd, rfds); maxfd = fd maxfd ? fd : maxfd; } + assert(maxfd + 1 = (int)FD_SETSIZE); ret = select(maxfd + 1, rfds, NULL, NULL, timeout); if (ret == 0) hook_check(false); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213009 - head/sbin/hastd
Author: pjd Date: Wed Sep 22 19:08:11 2010 New Revision: 213009 URL: http://svn.freebsd.org/changeset/base/213009 Log: Switch to sigprocmask(2) API also in the main process and secondary process. This way the primary process inherits signal mask from the main process, which fixes a race where signal is delivered to the primary process before configuring signal mask. Reported by: Mikolaj Golub to.my.troc...@gmail.com MFC after:3 days Modified: head/sbin/hastd/hastd.c head/sbin/hastd/hastd.h head/sbin/hastd/primary.c head/sbin/hastd/secondary.c Modified: head/sbin/hastd/hastd.c == --- head/sbin/hastd/hastd.c Wed Sep 22 19:05:54 2010(r213008) +++ head/sbin/hastd/hastd.c Wed Sep 22 19:08:11 2010(r213009) @@ -63,10 +63,6 @@ __FBSDID($FreeBSD$); const char *cfgpath = HAST_CONFIG; /* Hastd configuration. */ static struct hastd_config *cfg; -/* Was SIGCHLD signal received? */ -bool sigchld_received = false; -/* Was SIGHUP signal received? */ -bool sighup_received = false; /* Was SIGINT or SIGTERM signal received? */ bool sigexit_received = false; /* PID file handle. */ @@ -83,26 +79,6 @@ usage(void) } static void -sighandler(int sig) -{ - - switch (sig) { - case SIGINT: - case SIGTERM: - sigexit_received = true; - break; - case SIGCHLD: - sigchld_received = true; - break; - case SIGHUP: - sighup_received = true; - break; - default: - assert(!invalid condition); - } -} - -static void g_gate_load(void) { @@ -625,26 +601,41 @@ static void main_loop(void) { struct hast_resource *res; - struct timeval timeout; - int fd, maxfd, ret; + struct timeval seltimeout; + struct timespec sigtimeout; + int fd, maxfd, ret, signo; + sigset_t mask; fd_set rfds; - timeout.tv_sec = REPORT_INTERVAL; - timeout.tv_usec = 0; + seltimeout.tv_sec = REPORT_INTERVAL; + seltimeout.tv_usec = 0; + sigtimeout.tv_sec = 0; + sigtimeout.tv_nsec = 0; + + PJDLOG_VERIFY(sigemptyset(mask) == 0); + PJDLOG_VERIFY(sigaddset(mask, SIGHUP) == 0); + PJDLOG_VERIFY(sigaddset(mask, SIGINT) == 0); + PJDLOG_VERIFY(sigaddset(mask, SIGTERM) == 0); + PJDLOG_VERIFY(sigaddset(mask, SIGCHLD) == 0); for (;;) { - if (sigexit_received) { - sigexit_received = false; - terminate_workers(); - exit(EX_OK); - } - if (sigchld_received) { - sigchld_received = false; - child_exit(); - } - if (sighup_received) { - sighup_received = false; - hastd_reload(); + while ((signo = sigtimedwait(mask, NULL, sigtimeout)) != -1) { + switch (signo) { + case SIGINT: + case SIGTERM: + sigexit_received = true; + terminate_workers(); + exit(EX_OK); + break; + case SIGCHLD: + child_exit(); + break; + case SIGHUP: + hastd_reload(); + break; + default: + assert(!invalid condition); + } } /* Setup descriptors for select(2). */ @@ -666,7 +657,7 @@ main_loop(void) } assert(maxfd + 1 = (int)FD_SETSIZE); - ret = select(maxfd + 1, rfds, NULL, NULL, timeout); + ret = select(maxfd + 1, rfds, NULL, NULL, seltimeout); if (ret == 0) hook_check(false); else if (ret == -1) { @@ -701,6 +692,7 @@ main(int argc, char *argv[]) pid_t otherpid; bool foreground; int debuglevel; + sigset_t mask; g_gate_load(); @@ -751,10 +743,12 @@ main(int argc, char *argv[]) cfg = yy_config_parse(cfgpath, true); assert(cfg != NULL); - signal(SIGINT, sighandler); - signal(SIGTERM, sighandler); - signal(SIGHUP, sighandler); - signal(SIGCHLD, sighandler); + PJDLOG_VERIFY(sigemptyset(mask) == 0); + PJDLOG_VERIFY(sigaddset(mask, SIGHUP) == 0); + PJDLOG_VERIFY(sigaddset(mask, SIGINT) == 0); + PJDLOG_VERIFY(sigaddset(mask, SIGTERM) == 0); + PJDLOG_VERIFY(sigaddset(mask, SIGCHLD) == 0); + PJDLOG_VERIFY(sigprocmask(SIG_SETMASK, mask, NULL) == 0); /* Listen on control address. */ if
Re: svn commit: r212964 - head/sys/kern
on 22/09/2010 22:58 John Baldwin said the following: Agreed. FWIW, I actually think that this is the only change needed as crashinfo is enabled by default in 8.x and later. We already include symbols in kernels by default now, so just setting dumpdev will give you the same info you generally can get from a textdump in the form of a simple /var/crash/core.txt.N file. The other benefit of full crashdumps + crashinfo as compared to textdumps is that a developer can request further information in a PR followup (fire up kgdb and enter command 'X' and reply with the output). With a textdump any info not collected by the textdump is lost once the machine reboots after the crash. Agree++ But what was the reason that dumpdev=AUTO was reverted? I remember that POLA was quoted at the time. I am not sure what the astonishment actually was - perhaps 'AUTO' was not smart enough and destroyed somebody's data? -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213028 - head/sys/net
Author: jhb Date: Wed Sep 22 21:02:43 2010 New Revision: 213028 URL: http://svn.freebsd.org/changeset/base/213028 Log: - Expand scope of tun/tap softc locks to cover more softc fields and driver-maintained ifnet fields (such as if_drv_flags). - Use soft locks as the mutex that protects each interface's knote list rather than using the global knote list lock. Also, use the softc for kn_hook instead of the cdev. - Use mtx_sleep() instead of tsleep() when blocking in the read routines. This fixes a lost wakeup race. - Remove D_NEEDGIANT now that the cdevsw routines use the softc lock where locking is needed. - Lock IFQ when calculating the result for FIONREAD in tap(4). tun(4) already did this. - Remove remaining spl calls. Submitted by: Marcin Cieslak saper of saper|info (3) MFC after:2 weeks Modified: head/sys/net/if_tap.c head/sys/net/if_tun.c Modified: head/sys/net/if_tap.c == --- head/sys/net/if_tap.c Wed Sep 22 20:27:59 2010(r213027) +++ head/sys/net/if_tap.c Wed Sep 22 21:02:43 2010(r213028) @@ -132,7 +132,7 @@ static struct filterops tap_write_filter static struct cdevsw tap_cdevsw = { .d_version =D_VERSION, - .d_flags = D_PSEUDO | D_NEEDGIANT | D_NEEDMINOR, + .d_flags = D_PSEUDO | D_NEEDMINOR, .d_open = tapopen, .d_close = tapclose, .d_read = tapread, @@ -209,7 +209,6 @@ static void tap_destroy(struct tap_softc *tp) { struct ifnet *ifp = tp-tap_ifp; - int s; /* Unlocked read. */ KASSERT(!(tp-tap_flags TAP_OPEN), @@ -217,10 +216,8 @@ tap_destroy(struct tap_softc *tp) knlist_destroy(tp-tap_rsel.si_note); destroy_dev(tp-tap_dev); - s = splimp(); ether_ifdetach(ifp); if_free_type(ifp, IFT_ETHER); - splx(s); mtx_destroy(tp-tap_mtx); free(tp, M_TAP); @@ -398,7 +395,7 @@ tapcreate(struct cdev *dev) struct tap_softc*tp = NULL; unsigned short macaddr_hi; uint32_t macaddr_mid; - int unit, s; + int unit; char*name = NULL; u_char eaddr[6]; @@ -442,22 +439,20 @@ tapcreate(struct cdev *dev) ifp-if_ioctl = tapifioctl; ifp-if_mtu = ETHERMTU; ifp-if_flags = (IFF_BROADCAST|IFF_SIMPLEX|IFF_MULTICAST); - ifp-if_snd.ifq_maxlen = ifqmaxlen; + IFQ_SET_MAXLEN(ifp-if_snd, ifqmaxlen); ifp-if_capabilities |= IFCAP_LINKSTATE; ifp-if_capenable |= IFCAP_LINKSTATE; dev-si_drv1 = tp; tp-tap_dev = dev; - s = splimp(); ether_ifattach(ifp, eaddr); - splx(s); mtx_lock(tp-tap_mtx); tp-tap_flags |= TAP_INITED; mtx_unlock(tp-tap_mtx); - knlist_init_mtx(tp-tap_rsel.si_note, NULL); + knlist_init_mtx(tp-tap_rsel.si_note, tp-tap_mtx); TAPDEBUG(interface %s is created. minor = %#x\n, ifp-if_xname, dev2unit(dev)); @@ -474,7 +469,7 @@ tapopen(struct cdev *dev, int flag, int { struct tap_softc*tp = NULL; struct ifnet*ifp = NULL; - int error, s; + int error; if (tapuopen == 0) { error = priv_check(td, PRIV_NET_TAP); @@ -497,15 +492,13 @@ tapopen(struct cdev *dev, int flag, int tp-tap_pid = td-td_proc-p_pid; tp-tap_flags |= TAP_OPEN; ifp = tp-tap_ifp; - mtx_unlock(tp-tap_mtx); - s = splimp(); ifp-if_drv_flags |= IFF_DRV_RUNNING; ifp-if_drv_flags = ~IFF_DRV_OACTIVE; if (tapuponopen) ifp-if_flags |= IFF_UP; if_link_state_change(ifp, LINK_STATE_UP); - splx(s); + mtx_unlock(tp-tap_mtx); TAPDEBUG(%s is open. minor = %#x\n, ifp-if_xname, dev2unit(dev)); @@ -524,9 +517,9 @@ tapclose(struct cdev *dev, int foo, int struct ifaddr *ifa; struct tap_softc*tp = dev-si_drv1; struct ifnet*ifp = tp-tap_ifp; - int s; /* junk all pending output */ + mtx_lock(tp-tap_mtx); IF_DRAIN(ifp-if_snd); /* @@ -534,28 +527,26 @@ tapclose(struct cdev *dev, int foo, int * interface, if we are in VMnet mode. just close the device. */ - mtx_lock(tp-tap_mtx); if (((tp-tap_flags TAP_VMNET) == 0) (ifp-if_flags IFF_UP)) { mtx_unlock(tp-tap_mtx); - s = splimp(); if_down(ifp); + mtx_lock(tp-tap_mtx); if (ifp-if_drv_flags IFF_DRV_RUNNING) { + ifp-if_drv_flags = ~IFF_DRV_RUNNING; + mtx_unlock(tp-tap_mtx);
svn commit: r213032 - head/usr.bin/calendar/calendars
Author: edwin Date: Wed Sep 22 21:10:45 2010 New Revision: 213032 URL: http://svn.freebsd.org/changeset/base/213032 Log: Fix location of the Battle of the Plains of Abraham PR: 150504 Submitted by: Douglas Berry bit...@bitnix.ca MFC after:1 week Modified: head/usr.bin/calendar/calendars/calendar.history Modified: head/usr.bin/calendar/calendars/calendar.history == --- head/usr.bin/calendar/calendars/calendar.historyWed Sep 22 21:06:43 2010(r213031) +++ head/usr.bin/calendar/calendars/calendar.historyWed Sep 22 21:10:45 2010(r213032) @@ -303,7 +303,7 @@ 09/12 German paratroopers rescue Mussolini from captivity in Rome, 1943 09/12 Germany annexes Sudetenland, 1938 09/13 58� C (136.4� F) measured at el Azizia, Libya, 1922 -09/13 British defeat the French at Abraham near Quebec City, 1788 +09/13 British defeat the French at the Plains of Abraham near Quebec City, 1788 09/13 Building of Hadrian's Wall begun, 122 09/13 Chiang Kai-Shek becomes president of China, 1943 09/14 Benjamin Franklin is sent to France as an American minister, 1778 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213033 - head/usr.bin/calendar/calendars
Author: edwin Date: Wed Sep 22 21:14:18 2010 New Revision: 213033 URL: http://svn.freebsd.org/changeset/base/213033 Log: And now the 2nd part of the patch: Also fix the year. PR: 150504 Submitted by: Douglas Berry bit...@bitnix.ca Modified: head/usr.bin/calendar/calendars/calendar.history Modified: head/usr.bin/calendar/calendars/calendar.history == --- head/usr.bin/calendar/calendars/calendar.historyWed Sep 22 21:10:45 2010(r213032) +++ head/usr.bin/calendar/calendars/calendar.historyWed Sep 22 21:14:18 2010(r213033) @@ -303,7 +303,7 @@ 09/12 German paratroopers rescue Mussolini from captivity in Rome, 1943 09/12 Germany annexes Sudetenland, 1938 09/13 58� C (136.4� F) measured at el Azizia, Libya, 1922 -09/13 British defeat the French at the Plains of Abraham near Quebec City, 1788 +09/13 British defeat the French at the Plains of Abraham, just outside the walls of Quebec City, 1759 09/13 Building of Hadrian's Wall begun, 122 09/13 Chiang Kai-Shek becomes president of China, 1943 09/14 Benjamin Franklin is sent to France as an American minister, 1778 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r212964 - head/sys/kern
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/22/10 5:02 PM, Andriy Gapon wrote: on 22/09/2010 22:58 John Baldwin said the following: Agreed. FWIW, I actually think that this is the only change needed as crashinfo is enabled by default in 8.x and later. We already include symbols in kernels by default now, so just setting dumpdev will give you the same info you generally can get from a textdump in the form of a simple /var/crash/core.txt.N file. The other benefit of full crashdumps + crashinfo as compared to textdumps is that a developer can request further information in a PR followup (fire up kgdb and enter command 'X' and reply with the output). With a textdump any info not collected by the textdump is lost once the machine reboots after the crash. Agree++ But what was the reason that dumpdev=AUTO was reverted? I remember that POLA was quoted at the time. I am not sure what the astonishment actually was - perhaps 'AUTO' was not smart enough and destroyed somebody's data? Not everybody would notice /var getting full of crash dumps. Picture a server farm where for the most part the machines are all just plain on auto-pilot. If one or several develop a problem that causes panic's /var can become full and possibly cause the machine to stop doing something important (between panic's...). I wasn't around when the initial decision for what to have it set to was made but this was the reason for me starting to do it again when I realized I forgot to at least once, and hence the reference to POLA. Crash dumps are good for individual workstations. Crash dumps are good for servers *if* the admin knows they're having a problem and is actively working on that server to resolve the issue. But they're no so good and can cause nasty side-effects if they're happening on a machine not being watched over closely. That's the reason for the change in setting when a -stable branch gets started. - -- Ken Smith - - From there to here, from here to | kensm...@buffalo.edu there, funny things are everywhere. | - Theodore Geisel | -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyace0ACgkQ/G14VSmup/bfKwCdGWyWxuG91GSss6q3MUFAPi2r 6iwAmgLxxEXEODYubhfOFGkzwNx9r/Au =IIBd -END PGP SIGNATURE- ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r212964 - head/sys/kern
On Wednesday, September 22, 2010 5:15:25 pm Ken Smith wrote: On 9/22/10 5:02 PM, Andriy Gapon wrote: on 22/09/2010 22:58 John Baldwin said the following: Agreed. FWIW, I actually think that this is the only change needed as crashinfo is enabled by default in 8.x and later. We already include symbols in kernels by default now, so just setting dumpdev will give you the same info you generally can get from a textdump in the form of a simple /var/crash/core.txt.N file. The other benefit of full crashdumps + crashinfo as compared to textdumps is that a developer can request further information in a PR followup (fire up kgdb and enter command 'X' and reply with the output). With a textdump any info not collected by the textdump is lost once the machine reboots after the crash. Agree++ But what was the reason that dumpdev=AUTO was reverted? I remember that POLA was quoted at the time. I am not sure what the astonishment actually was - perhaps 'AUTO' was not smart enough and destroyed somebody's data? Not everybody would notice /var getting full of crash dumps. Picture a server farm where for the most part the machines are all just plain on auto-pilot. If one or several develop a problem that causes panic's /var can become full and possibly cause the machine to stop doing something important (between panic's...). I wasn't around when the initial decision for what to have it set to was made but this was the reason for me starting to do it again when I realized I forgot to at least once, and hence the reference to POLA. Crash dumps are good for individual workstations. Crash dumps are good for servers *if* the admin knows they're having a problem and is actively working on that server to resolve the issue. But they're no so good and can cause nasty side-effects if they're happening on a machine not being watched over closely. That's the reason for the change in setting when a -stable branch gets started. FWIW, the Y! version of crashinfo auto-deletes crash dumps based on the available disk space for precisely this reason. With that addition crashinfo works quite well on a very large server farm. -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r212964 - head/sys/kern
On Thu, 23 Sep 2010 00:02:30 +0300 Andriy Gapon a...@freebsd.org wrote: But what was the reason that dumpdev=AUTO was reverted? I remember that POLA was quoted at the time. I am not sure what the astonishment actually was - perhaps 'AUTO' was not smart enough and destroyed somebody's data? The problem with AUTO is that it takes time to do the dump unless using textdumps; it also has the potential of failing and leaving the system unusable until someone resets it. I believe the argument was that for production servers you want the system to be up and running again as soon as possible after a crash. -- Bruce Cran ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213044 - head/usr.bin/gzip
Author: delphij Date: Thu Sep 23 01:24:33 2010 New Revision: 213044 URL: http://svn.freebsd.org/changeset/base/213044 Log: In the past gunzip(1) write()'s after each inflate return. This is not optimal from a performance standpoint since the write buffer is not necessarily be filled up when the inflate rountine reached the end of input buffer and it's not the end of file. This problem gets uncovered by trying to pipe gunzip -c output to a GEOM device directly, which enforces the writes be multiple of sector size. Sponsored by: iXsystems, Inc. Reported by: jpaetzel MFC after:2 weeks Modified: head/usr.bin/gzip/gzip.c Modified: head/usr.bin/gzip/gzip.c == --- head/usr.bin/gzip/gzip.cThu Sep 23 01:19:31 2010(r213043) +++ head/usr.bin/gzip/gzip.cThu Sep 23 01:24:33 2010(r213044) @@ -916,6 +916,8 @@ gz_uncompress(int in, int out, char *pre switch (error) { /* Z_BUF_ERROR goes with Z_FINISH... */ case Z_BUF_ERROR: + if (z.avail_out 0 !done_reading) + continue; case Z_STREAM_END: case Z_OK: break; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213047 - head/sys/dev/ata/chipsets
Author: jchandra Date: Thu Sep 23 05:17:36 2010 New Revision: 213047 URL: http://svn.freebsd.org/changeset/base/213047 Log: Add missing byteswap, works on big endian systems now (tested on Netlogic XLS MIPS processor). Submitted by: Sreekanth M. S. kanthms at netlogicmicro dot com Reviewed by: mav Modified: head/sys/dev/ata/chipsets/ata-siliconimage.c Modified: head/sys/dev/ata/chipsets/ata-siliconimage.c == --- head/sys/dev/ata/chipsets/ata-siliconimage.cThu Sep 23 01:38:52 2010(r213046) +++ head/sys/dev/ata/chipsets/ata-siliconimage.cThu Sep 23 05:17:36 2010(r213047) @@ -649,7 +649,7 @@ ata_siiprb_end_transaction(struct ata_re /* update progress */ if (!(request-status ATA_S_ERROR) !(request-flags ATA_R_TIMEOUT)) { if (request-flags ATA_R_READ) - request-donecount = prb-transfer_count; + request-donecount = le32toh(prb-transfer_count); else request-donecount = request-bytecount; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r213048 - head/sys/sys
Author: jchandra Date: Thu Sep 23 05:24:50 2010 New Revision: 213048 URL: http://svn.freebsd.org/changeset/base/213048 Log: Add MIPS platform, this will make bsdlabel(8) work on MIPS (when invoked without a -m option. -m mips is still not supported) Modified: head/sys/sys/disklabel.h Modified: head/sys/sys/disklabel.h == --- head/sys/sys/disklabel.hThu Sep 23 05:17:36 2010(r213047) +++ head/sys/sys/disklabel.hThu Sep 23 05:24:50 2010(r213048) @@ -52,7 +52,7 @@ /* XXX these should be defined per controller (or drive) elsewhere, not here! */ #if defined(__i386__) || defined(__amd64__) || defined(__arm__) || \ -defined(__ia64__) || defined(__powerpc__) +defined(__ia64__) || defined(__powerpc__) || defined(__mips__) #define LABELSECTOR1 /* sector containing label */ #define LABELOFFSET0 /* offset of label in sector */ #endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org