Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Adrian Chadd
On 12 December 2012 23:19, Navdeep Parhar wrote: > On Wed, Dec 12, 2012 at 11:07:58PM -0800, Adrian Chadd wrote: >> Andriy, >> >> If you are willing to enable INVARIANTS by default in GENERIC, right >> now, then I think we should remove Alfred's work. > > It's already enabled by default in GENERIC

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Navdeep Parhar
On Wed, Dec 12, 2012 at 11:07:58PM -0800, Adrian Chadd wrote: > Andriy, > > If you are willing to enable INVARIANTS by default in GENERIC, right > now, then I think we should remove Alfred's work. It's already enabled by default in GENERIC in the development branch (aka head), which is exactly th

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Adrian Chadd
Hi, I think the fundamental problem here is we have some pretty different ideas of what KASSERT should be, versus what it actually is in various parts of the code. Since we're lost in semantics, we're not going to get any further on this discussion just for now, so let's take a break and think ab

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Andriy Gapon
on 13/12/2012 09:07 Adrian Chadd said the following: > Andriy, > > If you are willing to enable INVARIANTS by default in GENERIC, right > now, then I think we should remove Alfred's work. I do not see any connection. INVARIANTS in !CURRENT will not be enabled in GENERIC regardless of Alfred'd wor

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Andriy Gapon
on 13/12/2012 08:49 Adrian Chadd said the following: > Let me restate it again. > > We can ship a STABLE kernel with INVARIANTS enabled, and it not be any > less stable than the STABLE kernel is today. STABLE != stable, of course. And it will be much much slower, so no one (of the regular users)

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Adrian Chadd
Andriy, If you are willing to enable INVARIANTS by default in GENERIC, right now, then I think we should remove Alfred's work. Adrian ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, sen

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Andriy Gapon
on 13/12/2012 00:48 Alfred Perlstein said the following: > On 12/12/12 2:29 PM, Andriy Gapon wrote: >> Now we get a new middle-ground: get both worse performance (because KASSERTs >> are compiled in) and a risk of harming your data (because KASSERTs no longer >> panic). The upside: there is no pani

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Andriy Gapon
on 13/12/2012 00:43 Adrian Chadd said the following: > On 12 December 2012 14:33, Andriy Gapon wrote: > >>> Yes, two of my employers were more of "we want to get more debug metrics, we >>> have the spare cycles, but we can't deal with superfluous panics". >>> >>> It also allows us "non-architects

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Adrian Chadd
Let me restate it again. We can ship a STABLE kernel with INVARIANTS enabled, and it not be any less stable than the STABLE kernel is today. Adrian ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To uns

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Andriy Gapon
on 13/12/2012 00:38 Adrian Chadd said the following: > There are two parts to this; > > * don't compile in invariants. Panics panic. Invariant conditions > aren't checked. You end up with data corruption still if there are > bugs. > * compile in invariants. Panics panic. Invariant conditions are >

svn commit: r244180 - head/contrib/top

2012-12-12 Thread Rui Paulo
Author: rpaulo Date: Thu Dec 13 06:45:45 2012 New Revision: 244180 URL: http://svnweb.freebsd.org/changeset/base/244180 Log: Bump MAX_COLS to 512 to take advantage of wider terminals. Modified: head/contrib/top/top.h Modified: head/contrib/top/top.h ==

svn commit: r244179 - head/sys/powerpc/wii

2012-12-12 Thread Rui Paulo
Author: rpaulo Date: Thu Dec 13 06:42:44 2012 New Revision: 244179 URL: http://svnweb.freebsd.org/changeset/base/244179 Log: Add the common FreeBSD SVN properties. Modified: Directory Properties: head/sys/powerpc/wii/locore.S (props changed) ___ s

svn commit: r244171 - head/sys/dev/uart

2012-12-12 Thread Oleksandr Tymoshenko
Author: gonzo Date: Thu Dec 13 03:35:47 2012 New Revision: 244171 URL: http://svnweb.freebsd.org/changeset/base/244171 Log: Prevent possible usage of uninitialized pbase variable by checking return value of fdt_get_range Modified: head/sys/dev/uart/uart_bus_fdt.c Modified: head/sys/dev

svn commit: r244170 - head/sys/dev/sym

2012-12-12 Thread Oleksandr Tymoshenko
Author: gonzo Date: Thu Dec 13 03:34:24 2012 New Revision: 244170 URL: http://svnweb.freebsd.org/changeset/base/244170 Log: Add memory barrier macros for ARM Modified: head/sys/dev/sym/sym_hipd.c Modified: head/sys/dev/sym/sym_hipd.c ==

svn commit: r244169 - head/sys/dev/smc

2012-12-12 Thread Oleksandr Tymoshenko
Author: gonzo Date: Thu Dec 13 03:33:01 2012 New Revision: 244169 URL: http://svnweb.freebsd.org/changeset/base/244169 Log: Disable interrupts in filter in order to avoid interrupt storm and CPU starvation Modified: head/sys/dev/smc/if_smc.c Modified: head/sys/dev/smc/if_smc.c

svn commit: r244168 - head/usr.bin/calendar

2012-12-12 Thread Greg Lehey
Author: grog Date: Thu Dec 13 02:21:05 2012 New Revision: 244168 URL: http://svnweb.freebsd.org/changeset/base/244168 Log: Use even more conventional conversion routines. Reported by: peterj@ Modified: head/usr.bin/calendar/parsedata.c Modified: head/usr.bin/calendar/parsedata.c ===

svn commit: r244166 - head/usr.bin/calendar

2012-12-12 Thread Greg Lehey
Author: grog Date: Thu Dec 13 01:44:58 2012 New Revision: 244166 URL: http://svnweb.freebsd.org/changeset/base/244166 Log: Reluctantly remove one of the most extraordinary numeric conversion routines I have ever seen and replace with something far more boring. Modified: head/usr.bin/calenda

Re: svn commit: r244165 - head/usr.sbin/portsnap/portsnap

2012-12-12 Thread Alfred Perlstein
Reviewed by: eadler On 12/12/12 5:39 PM, Alfred Perlstein wrote: Author: alfred Date: Thu Dec 13 01:39:49 2012 New Revision: 244165 URL: http://svnweb.freebsd.org/changeset/base/244165 Log: Change progress indicator for downloading patches. Use a percent style indicator instead of emi

svn commit: r244165 - head/usr.sbin/portsnap/portsnap

2012-12-12 Thread Alfred Perlstein
Author: alfred Date: Thu Dec 13 01:39:49 2012 New Revision: 244165 URL: http://svnweb.freebsd.org/changeset/base/244165 Log: Change progress indicator for downloading patches. Use a percent style indicator instead of emitting one long line of patch numbers. Modified: head/usr.sbin/port

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Adrian Chadd
.. just make sure you've preallocated all the space needed by the gzip code when writing those dumps. :-) Adrian ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Alfred Perlstein
On 12/12/12 4:25 PM, Navdeep Parhar wrote: On 12/12/12 16:09, Alfred Perlstein wrote: What do you think happens to a FreeBSD kernel when INVARIANTS is compiled in and it trips an assertion after my change? I know the new knob has sane defaults. My point was that invariants should be consider

svn commit: r244164 - head/share/syscons/keymaps

2012-12-12 Thread Eitan Adler
Author: eadler Date: Thu Dec 13 00:44:23 2012 New Revision: 244164 URL: http://svnweb.freebsd.org/changeset/base/244164 Log: Give credit where credit is due. Requested by: Álvaro Castillo Approved by: cperciva (implicit) Modified: head/share/syscons/keymaps/spanish.dvorak.kbd Modifie

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Adrian Chadd
If a kassert is inviolable, then make it a panic() and include in the default kernel. Right now there's no distinction between "kassert for a condition that shouldn't happen, but we fail gracefully" and "kassert for a condition that shouldn't happen, and we don't handle at all." Ideally we'd crea

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Navdeep Parhar
On 12/12/12 16:09, Alfred Perlstein wrote: > On 12/12/12 4:02 PM, Navdeep Parhar wrote: >> On 12/12/12 14:48, Alfred Perlstein wrote: >>> On 12/12/12 2:29 PM, Andriy Gapon wrote: Now we get a new middle-ground: get both worse performance (because KASSERTs are compiled in) and a risk of ha

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Alfred Perlstein
On 12/12/12 4:02 PM, Navdeep Parhar wrote: On 12/12/12 14:48, Alfred Perlstein wrote: On 12/12/12 2:29 PM, Andriy Gapon wrote: Now we get a new middle-ground: get both worse performance (because KASSERTs are compiled in) and a risk of harming your data (because KASSERTs no longer panic). The up

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Navdeep Parhar
On 12/12/12 14:48, Alfred Perlstein wrote: > On 12/12/12 2:29 PM, Andriy Gapon wrote: >> Now we get a new middle-ground: get both worse performance (because >> KASSERTs are compiled in) and a risk of harming your data (because >> KASSERTs no longer panic). The upside: there is no panic! There's jus

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Alfred Perlstein
On 12/12/12 2:38 PM, Adrian Chadd wrote: There are two parts to this; * don't compile in invariants. Panics panic. Invariant conditions aren't checked. You end up with data corruption still if there are bugs. * compile in invariants. Panics panic. Invariant conditions are checked and immediately

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Alfred Perlstein
On 12/12/12 2:29 PM, Andriy Gapon wrote: Now we get a new middle-ground: get both worse performance (because KASSERTs are compiled in) and a risk of harming your data (because KASSERTs no longer panic). The upside: there is no panic! There's just a log message (or etc). and chance to get more l

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Adrian Chadd
On 12 December 2012 14:33, Andriy Gapon wrote: >> Yes, two of my employers were more of "we want to get more debug metrics, we >> have the spare cycles, but we can't deal with superfluous panics". >> >> It also allows us "non-architects" to slip in a debug image when we have >> spare >> cpu with

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Adrian Chadd
There are two parts to this; * don't compile in invariants. Panics panic. Invariant conditions aren't checked. You end up with data corruption still if there are bugs. * compile in invariants. Panics panic. Invariant conditions are checked and immediately panic. You can't run this in production to

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Andriy Gapon
on 12/12/2012 19:06 Adrian Chadd said the following: > kassert()s are already optional. Ie, you can choose to not compile them in. > > So the __dead2() code path bit for doing KASSERT() -> kassert_panic() > at compile time isn't a problem. > > The problem is where you do panic() -> kassert_panic(

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Andriy Gapon
on 13/12/2012 00:27 Alfred Perlstein said the following: > On 12/12/12 2:15 PM, Adrian Chadd wrote: >> On 12 December 2012 13:58, John Baldwin wrote: >> >> >>> (Note that the primary reason I know for people not running with INVARIANTS >>> enabled is not that they don't want panics, but that they

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Andriy Gapon
on 12/12/2012 23:58 John Baldwin said the following: > Hmmm, I'll have to chew on this. Adding lots of returns because panic's are > now no longer dead2 was why I ended up backing the removal of the > RESTARTABLE_PANICS option. > > I'm inclined to say that it's really bad to let a kernel known to

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Alfred Perlstein
On 12/12/12 2:15 PM, Adrian Chadd wrote: On 12 December 2012 13:58, John Baldwin wrote: (Note that the primary reason I know for people not running with INVARIANTS enabled is not that they don't want panics, but that they don't want the performance hit.) Well, it would be nice to be able to

svn commit: r244163 - head/share/misc

2012-12-12 Thread Jim Harris
Author: jimharris Date: Wed Dec 12 22:25:31 2012 New Revision: 244163 URL: http://svnweb.freebsd.org/changeset/base/244163 Log: Add my ex-mentors. Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ===

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Adrian Chadd
On 12 December 2012 13:58, John Baldwin wrote: >> Anything which is a KASSERT() can and should be treated as a run-time >> warning just as much as a run-time "crash here so I can figure out >> what broke." Having the warning in a production box is going to be >> helpful for developers. > > Hmmm,

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread John Baldwin
On Wednesday, December 12, 2012 12:06:22 pm Adrian Chadd wrote: > kassert()s are already optional. Ie, you can choose to not compile them in. > > So the __dead2() code path bit for doing KASSERT() -> kassert_panic() > at compile time isn't a problem. > > The problem is where you do panic() -> kas

svn commit: r244162 - in head: bin/sh tools/regression/bin/sh/errors

2012-12-12 Thread Jilles Tjoelker
Author: jilles Date: Wed Dec 12 22:01:10 2012 New Revision: 244162 URL: http://svnweb.freebsd.org/changeset/base/244162 Log: sh: Detect and flag write errors on stdout in builtins. If there is a write error on stdout, a message will be printed (to stderr) and the exit status will be chang

Re: svn commit: r244154 - head/bin/ps

2012-12-12 Thread Konstantin Belousov
On Wed, Dec 12, 2012 at 03:45:04PM +, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Wed Dec 12 15:45:03 2012 > New Revision: 244154 > URL: http://svnweb.freebsd.org/changeset/base/244154 > > Log: > Use kern.max_pid sysctl to obtain maximum PID number instead of using local > define. It

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Alfred Perlstein
to all: I am trying to take this offline with John so that we can discuss the reasoning behind the change and come to an agreement on how it is implemented, or if not to remove it. -Alfred On 12/12/12 7:46 AM, John Baldwin wrote: On Tuesday, December 11, 2012 2:08:14 am Alfred Perlstein wro

svn commit: r244158 - head/sys/boot/forth

2012-12-12 Thread Devin Teske
Author: dteske Date: Wed Dec 12 17:49:01 2012 New Revision: 244158 URL: http://svnweb.freebsd.org/changeset/base/244158 Log: Fix a regression caused by SVN r222417. Prior to r222417, setting `password' in loader.conf(5) did not prevent boot but instead only prevented changes to boot optio

svn commit: r244157 - head/sys/netinet

2012-12-12 Thread Gleb Smirnoff
Author: glebius Date: Wed Dec 12 17:41:21 2012 New Revision: 244157 URL: http://svnweb.freebsd.org/changeset/base/244157 Log: Fix a crash in tcp_input(), that happens when mbuf has a fwd_tag on it, but later after processing and freeing the tag, we need to jump back again to the findpcb la

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread Adrian Chadd
kassert()s are already optional. Ie, you can choose to not compile them in. So the __dead2() code path bit for doing KASSERT() -> kassert_panic() at compile time isn't a problem. The problem is where you do panic() -> kassert_panic() (eg in the Witness code) which is what Alfred discovered shortl

svn commit: r244156 - head/share/misc

2012-12-12 Thread Steven Hartland
Author: smh Date: Wed Dec 12 16:59:07 2012 New Revision: 244156 URL: http://svnweb.freebsd.org/changeset/base/244156 Log: Add myself as a new src committer Approved by: pjd (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ==

Re: svn commit: r244154 - head/bin/ps

2012-12-12 Thread Pawel Jakub Dawidek
On Wed, Dec 12, 2012 at 11:37:00AM -0500, Eitan Adler wrote: > On 12 December 2012 10:45, Pawel Jakub Dawidek wrote: > > > + if (sysctlbyname("kern.pid_max", &pid_max, &intsize, NULL, 0) < 0) { > > + warn("unable to read kern.pid_max"); > > Silly question, when could this fai

Re: svn commit: r244154 - head/bin/ps

2012-12-12 Thread Eitan Adler
On 12 December 2012 10:45, Pawel Jakub Dawidek wrote: > + if (sysctlbyname("kern.pid_max", &pid_max, &intsize, NULL, 0) < 0) { > + warn("unable to read kern.pid_max"); Silly question, when could this fail and not be fatal? > + pid_max = 9; Why not use PID_

svn commit: r244155 - in head/sys/cddl: compat/opensolaris/kern compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs contrib/opensolaris/uts/common/fs/zfs/sys

2012-12-12 Thread Steven Hartland
Author: smh Date: Wed Dec 12 16:14:14 2012 New Revision: 244155 URL: http://svnweb.freebsd.org/changeset/base/244155 Log: Renamed zfs trim stats removing duplicate zio_trim identifier from the name Added description option to kstats. Added descriptions for zio_trim kstats PR:

Re: svn commit: r244112 - head/sys/kern

2012-12-12 Thread John Baldwin
On Tuesday, December 11, 2012 2:08:14 am Alfred Perlstein wrote: > Author: alfred > Date: Tue Dec 11 07:08:14 2012 > New Revision: 244112 > URL: http://svnweb.freebsd.org/changeset/base/244112 > > Log: > Cleanup more of the kassert_panic. > > fix compile warnings on !amd64 and NULL derefs t

Re: svn commit: r244105 - in head/sys: kern sys

2012-12-12 Thread John Baldwin
On Monday, December 10, 2012 8:23:51 pm Alfred Perlstein wrote: > Author: alfred > Date: Tue Dec 11 01:23:50 2012 > New Revision: 244105 > URL: http://svnweb.freebsd.org/changeset/base/244105 > > Log: > Switch the hardwired WITNESS panics to kassert_panic. > > This is an ongoing effort to p

svn commit: r244154 - head/bin/ps

2012-12-12 Thread Pawel Jakub Dawidek
Author: pjd Date: Wed Dec 12 15:45:03 2012 New Revision: 244154 URL: http://svnweb.freebsd.org/changeset/base/244154 Log: Use kern.max_pid sysctl to obtain maximum PID number instead of using local define. Reviewed by: jhb Modified: head/bin/ps/ps.c Modified: head/bin/ps/ps.c ===

svn commit: r244153 - head/lib/libc/gen

2012-12-12 Thread Pawel Jakub Dawidek
Author: pjd Date: Wed Dec 12 15:27:33 2012 New Revision: 244153 URL: http://svnweb.freebsd.org/changeset/base/244153 Log: Eliminate redundant variable. Modified: head/lib/libc/gen/sysctlbyname.c Modified: head/lib/libc/gen/sysctlbyname.c ==

svn commit: r244146 - in head/sys/dev: ahci ata ata/chipsets

2012-12-12 Thread Alexander Motin
Author: mav Date: Wed Dec 12 11:53:15 2012 New Revision: 244146 URL: http://svnweb.freebsd.org/changeset/base/244146 Log: Add IDs for SATA controllers on AMD Hudson-2 series chipsets. I am not exactly sure about the naming due to lack of specs on AMD site, but it is better to have some ident

svn commit: r244145 - head/sys/dev/sound/pci/hda

2012-12-12 Thread Alexander Motin
Author: mav Date: Wed Dec 12 11:44:20 2012 New Revision: 244145 URL: http://svnweb.freebsd.org/changeset/base/244145 Log: Add quirks for AD1984A codec and Lenovo X300 laptop. PR: kern/148741 MFC after:2 weeks Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c head/sys/

svn commit: r244144 - in head/sys/amd64: amd64 include

2012-12-12 Thread Peter Grehan
Author: grehan Date: Wed Dec 12 08:35:32 2012 New Revision: 244144 URL: http://svnweb.freebsd.org/changeset/base/244144 Log: Implement an API to allow a hypervisor to save/restore guest floating point state without having to know the size of floating-point state. Unstaticize fpurestore