Re: svn commit: r253636 - head/sys/vm

2013-07-25 Thread mdf
On Thu, Jul 25, 2013 at 4:43 AM, David Chisnall wrote: > However(), memset is to be preferred in this idiom because the compiler > provides better diagnostics in the case of error: > > bzero.c:9:22: warning: 'memset' call operates on objects of type 'struct > foo' > while the size is based o

Re: svn commit: r252376 - head/lib/libutil

2013-06-29 Thread mdf
On Sat, Jun 29, 2013 at 9:36 AM, Tim Kientzle wrote: > > On Jun 29, 2013, at 9:19 AM, Konstantin Belousov wrote: > > > On Sat, Jun 29, 2013 at 03:52:49PM +, Tim Kientzle wrote: > >> Author: kientzle > >> Date: Sat Jun 29 15:52:48 2013 > >> New Revision: 252376 > >> URL: http://svnweb.freebsd.

Re: svn commit: r252032 - head/sys/amd64/include

2013-06-24 Thread mdf
[snipping everything about counter64, atomic ops, cycles, etc.] I wonder if the idea explained in this paper: http://static.usenix.org/event/usenix03/tech/freenix03/full_papers/mcgarry/mcgarry_html/ Which seems to be used in FreeBSD for some ARM atomics: http://svnweb.freebsd.org/base/head/sys/

Re: svn commit: r250986 - head/sys/dev/usb

2013-05-25 Thread mdf
On Sat, May 25, 2013 at 10:09 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Sat May 25 17:09:58 2013 > New Revision: 250986 > URL: http://svnweb.freebsd.org/changeset/base/250986 > > Log: > Fix some statical clang analyzer warnings. > > Modified: > head/sys/dev/usb/usb_device.c >

Re: svn commit: r250249 - in stable/8/sys: . amd64/amd64 dev/sound i386/i386 kern

2013-05-06 Thread mdf
On Mon, May 6, 2013 at 6:59 AM, John Baldwin wrote: > On Saturday, May 04, 2013 3:06:12 pm Dimitry Andric wrote: > > On May 4, 2013, at 20:51, m...@freebsd.org wrote: > > > On Sat, May 4, 2013 at 11:49 AM, Matthew D Fleming > wrote: > > > Author: mdf > &

Re: svn commit: r250249 - in stable/8/sys: . amd64/amd64 dev/sound i386/i386 kern

2013-05-04 Thread mdf
On Sat, May 4, 2013 at 11:49 AM, Matthew D Fleming wrote: > Author: mdf > Date: Sat May 4 18:49:04 2013 > New Revision: 250249 > URL: http://svnweb.freebsd.org/changeset/base/250249 > > Log: > MFC r248933: > > Use a shared lock for VOP_GETEXTATTR, as

Re: svn commit: r249105 - in head/sys/cam: ata scsi

2013-04-05 Thread mdf
On Fri, Apr 5, 2013 at 8:21 AM, Bruce Evans wrote: > This method works well in userland too. Instead of assert() or abort(), > use an null dereference, or more portably, a signal Digressing quite a bit, doesn't abort() send a signal already, i.e. SIGABRT? And doesn't __assert() call abort()?

Re: svn commit: r248649 - in head: share/man/man9 sys/kern sys/sys

2013-03-23 Thread mdf
On Sat, Mar 23, 2013 at 9:45 AM, Will Andrews wrote: > I agree about the name length, it is a bit obnoxious. However, it is also > descriptive. TQCB strikes me as perhaps a bit too far in the other > direction. How about TQ_CALLBACK_? Is there an existing (pseudo) > convention for callback nam

Re: svn commit: r248649 - in head: share/man/man9 sys/kern sys/sys

2013-03-23 Thread mdf
On Sat, Mar 23, 2013 at 8:11 AM, Will Andrews wrote: > Author: will > Date: Sat Mar 23 15:11:53 2013 > New Revision: 248649 > URL: http://svnweb.freebsd.org/changeset/base/248649 > > Log: > Extend taskqueue(9) to enable per-taskqueue callbacks. > > The scope of these callbacks is primarily to

Re: svn commit: r247014 - head/lib/libc/stdlib

2013-02-20 Thread mdf
On Tue, Feb 19, 2013 at 3:57 PM, Giorgos Keramidas wrote: > Author: keramida (doc committer) > Date: Tue Feb 19 23:57:39 2013 > New Revision: 247014 > URL: http://svnweb.freebsd.org/changeset/base/247014 > > Log: > Add a sample program that shows how a custom comparison function and > qsort(3)

Re: svn commit: r244663 - stable/9

2012-12-29 Thread mdf
On Sat, Dec 29, 2012 at 6:38 PM, Benjamin Kaduk wrote: > On Sat, Dec 29, 2012 at 5:44 AM, Robert N. M. Watson > wrote: >> >> When we talked to various VFS maintainers, looked at the past change >> history there, and looked at the set of third-party file systems >> (especially, those we could see

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

2012-12-13 Thread mdf
On Thu, Dec 13, 2012 at 1:42 AM, Andriy Gapon wrote: > on 13/12/2012 09:16 Adrian Chadd said the following: >> 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. > > Oh, and

Re: svn commit: r243134 - head/sys/sys

2012-11-16 Thread mdf
On Thu, Nov 15, 2012 at 10:25 PM, Konstantin Belousov wrote: > Author: kib > Date: Fri Nov 16 06:25:20 2012 > New Revision: 243134 > URL: http://svnweb.freebsd.org/changeset/base/243134 > > Log: > Alphabetically reorder the forward-declarations of the structures. > Add the declaration for enum

Re: svn commit: r241471 - head/share/man/man9

2012-10-12 Thread mdf
On Thu, Oct 11, 2012 at 9:55 PM, Gleb Smirnoff wrote: > On Fri, Oct 12, 2012 at 01:31:03AM +, Kevin Lo wrote: > K> Author: kevlo > K> Date: Fri Oct 12 01:31:02 2012 > K> New Revision: 241471 > K> URL: http://svn.freebsd.org/changeset/base/241471 > K> > K> Log: > K> Since the moduledata struc

Re: svn commit: r241373 - head/lib/libc/stdlib

2012-10-09 Thread mdf
On Tue, Oct 9, 2012 at 10:16 AM, David Chisnall wrote: > On 9 Oct 2012, at 17:33, Andrey Chernov wrote: > >> Do you check assembler output for _both_ cases? >> In my testing clang and gcc xor's 'junk' properly in case it have >> 'volatile' keyword (as in srandomdev()) and elide it without 'volatil

Re: svn commit: r240549 - head/sys/arm/tegra

2012-09-16 Thread mdf
On Sun, Sep 16, 2012 at 2:53 AM, Alexey Dokuchaev wrote: > On Sun, Sep 16, 2012 at 10:37:56AM +0100, Chris Rees wrote: >> On 16 September 2012 10:28, Alexey Dokuchaev wrote: >> > I thought preferred and more style(9) compliant way to code [empty >> > endless loop] is: >> > >> > for (;;) >

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

2012-09-03 Thread mdf
On Mon, Sep 3, 2012 at 1:52 AM, Aleksandr Rybalko wrote: > Author: ray > Date: Mon Sep 3 08:52:05 2012 > New Revision: 240067 > URL: http://svn.freebsd.org/changeset/base/240067 > > Log: > Add kern.hintmode sysctl variable to show current state of hints: > 0 - loader hints in environment only

Re: svn commit: r238502 - in head/sys: kern vm

2012-07-15 Thread mdf
On Sun, Jul 15, 2012 at 1:29 PM, Matthew D Fleming wrote: > Author: mdf > Date: Sun Jul 15 20:29:48 2012 > New Revision: 238502 > URL: http://svn.freebsd.org/changeset/base/238502 > > Log: > Fix a bug with memguard(9) on 32-bit architectures without a > VM_KMEM_MAX_

Re: svn commit: r236380 - head/sys/vm

2012-06-01 Thread mdf
On Fri, Jun 1, 2012 at 2:14 AM, Bruce Evans wrote: >>> +SYSCTL_OID(_vm, OID_AUTO, swap_free, >>> CTLTYPE_INT|CTLFLAG_RD|CTLFLAG_MPSAFE, >>> +               NULL, 0, sysctl_vm_swap_free, "Q", >>> +               "Blocks of free swap storage."); > > > Bug 9 is a style bug.  I didn't even know that t

Re: svn commit: r235797 - head/contrib/gcc

2012-05-22 Thread mdf
On Tue, May 22, 2012 at 1:05 PM, Bruce Evans wrote: > On Tue, 22 May 2012, David E. O'Brien wrote: > >> Log: >>  Do not incorrectly warn when printing a quad_t using "%qd" on 64-bit >> platforms. > > > I think I like this, since it is technically correct, and will find a > different set of type mi

Re: svn commit: r231220 - head/sys/sys

2012-02-08 Thread mdf
On Wed, Feb 8, 2012 at 10:36 AM, Konstantin Belousov wrote: > Author: kib > Date: Wed Feb  8 18:36:07 2012 > New Revision: 231220 > URL: http://svn.freebsd.org/changeset/base/231220 > > Log: >  Trim 8 unused bytes from struct vnode on 64-bit architectures. Doesn't this change the KBI? So should

Re: svn commit: r228878 - head/include

2011-12-29 Thread mdf
On Thu, Dec 29, 2011 at 6:54 PM, Sean C. Farley wrote: > On Sun, 25 Dec 2011, Ed Schouten wrote: > >> Author: ed >> Date: Sun Dec 25 20:15:41 2011 >> New Revision: 228878 >> URL: http://svn.freebsd.org/changeset/base/228878 >> >> Log: >>  Remove unneeded guard. >> >>  There is no reason why needs

Re: svn commit: r228625 - head/usr.bin/csup

2011-12-17 Thread mdf
On Sat, Dec 17, 2011 at 1:54 PM, Dimitry Andric wrote: > On 2011-12-17 22:32, m...@freebsd.org wrote: > ... >>>  In usr.bin/csup/auth.c, use the correct number of bytes for zeroing the >>>  shared secret, and use long long format to snprintf a time_t. >> If casting is necessary, style prefers intm

Re: svn commit: r228625 - head/usr.bin/csup

2011-12-17 Thread mdf
On Sat, Dec 17, 2011 at 5:14 AM, Dimitry Andric wrote: > Author: dim > Date: Sat Dec 17 13:14:44 2011 > New Revision: 228625 > URL: http://svn.freebsd.org/changeset/base/228625 > > Log: >  In usr.bin/csup/auth.c, use the correct number of bytes for zeroing the >  shared secret, and use long long f

Re: svn commit: r227873 - head/usr.bin/procstat

2011-11-23 Thread mdf
On Tue, Nov 22, 2011 at 11:34 PM, Mikolaj Golub wrote: > Author: trociny > Date: Wed Nov 23 07:34:09 2011 > New Revision: 227873 > URL: http://svn.freebsd.org/changeset/base/227873 > > Log: >  Fix build, hopefully. > >  Reviewed by:  kib > > Modified: >  head/usr.bin/procstat/procstat_auxv.c > > M

Re: svn commit: r227812 - head/lib/libc/string

2011-11-21 Thread mdf
On Mon, Nov 21, 2011 at 6:50 PM, Eitan Adler wrote: > Author: eadler (ports committer) > Date: Tue Nov 22 02:50:24 2011 > New Revision: 227812 > URL: http://svn.freebsd.org/changeset/base/227812 > > Log: >  - fix some style(9) nits with my last commit >  - add a comment explaining why I used '|' i

Re: svn commit: r227588 - in head: share/man/man9 sys/kern sys/sys

2011-11-16 Thread mdf
On Wed, Nov 16, 2011 at 1:51 PM, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Wed Nov 16 21:51:17 2011 > New Revision: 227588 > URL: http://svn.freebsd.org/changeset/base/227588 > > Log: >  Constify arguments for locking KPIs where possible. > >  This enables locking consumers to pass their ow

Re: svn commit: r227541 - head/sys/dev/usb/controller

2011-11-15 Thread mdf
On Tue, Nov 15, 2011 at 1:22 PM, Hans Petter Selasky wrote: > On Tuesday 15 November 2011 22:20:18 m...@freebsd.org wrote: >> On Tue, Nov 15, 2011 at 1:02 PM, Hans Petter Selasky > wrote: >> > For USB compliant operation, the USB stack requires hz to be greater or >> > equal to 250 hz, to put it

Re: svn commit: r227541 - head/sys/dev/usb/controller

2011-11-15 Thread mdf
On Tue, Nov 15, 2011 at 1:22 PM, Hans Petter Selasky wrote: > On Tuesday 15 November 2011 22:20:18 m...@freebsd.org wrote: >> On Tue, Nov 15, 2011 at 1:02 PM, Hans Petter Selasky > wrote: >> > For USB compliant operation, the USB stack requires hz to be greater or >> > equal to 250 hz, to put it

Re: svn commit: r227541 - head/sys/dev/usb/controller

2011-11-15 Thread mdf
On Tue, Nov 15, 2011 at 1:20 PM, wrote: > On Tue, Nov 15, 2011 at 1:02 PM, Hans Petter Selasky wrote: >> For USB compliant operation, the USB stack requires hz to be greater or equal >> to 250 hz, to put it like that. Mostly a requirement in USB gadget/device >> mode. > > Really?  That's news to

Re: svn commit: r227541 - head/sys/dev/usb/controller

2011-11-15 Thread mdf
On Tue, Nov 15, 2011 at 1:02 PM, Hans Petter Selasky wrote: > For USB compliant operation, the USB stack requires hz to be greater or equal > to 250 hz, to put it like that. Mostly a requirement in USB gadget/device > mode. Really? That's news to me. Is that documented somewhere? I know we sti

Re: svn commit: r227541 - head/sys/dev/usb/controller

2011-11-15 Thread mdf
On Tue, Nov 15, 2011 at 12:48 PM, Hans Petter Selasky wrote: > Author: hselasky > Date: Tue Nov 15 20:48:57 2011 > New Revision: 227541 > URL: http://svn.freebsd.org/changeset/base/227541 > > Log: >  Some brands of XHCI controllers needs more time to reset. ... and since there's no guarantee that

Re: svn commit: r227473 - head/sbin/geom/class/multipath

2011-11-13 Thread mdf
On Sun, Nov 13, 2011 at 2:46 PM, Garrett Cooper wrote: > On Sun, Nov 13, 2011 at 2:08 PM, Pawel Jakub Dawidek wrote: >> On Sat, Nov 12, 2011 at 12:16:23PM -0800, Garrett Cooper wrote: >>> On Sat, Nov 12, 2011 at 12:01 PM, Alexander Motin wrote: >>> > Author: mav >>> > Date: Sat Nov 12 20:01:30 2

Re: svn commit: r221853 - in head/sys: dev/md dev/null sys vm

2011-05-31 Thread mdf
rder to parse precisely, but in general it looks like on my box using a 4K buffer results in significantly worse performance when the dd(1) block size is larger than 4K. How much worse depends on the block size, but it goes from 6% at bs=8k to 17% at bs>=256k. Showing 4k/64k/2M ZE

Re: svn commit: r221853 - in head/sys: dev/md dev/null sys vm

2011-05-31 Thread mdf
On Tue, May 31, 2011 at 2:48 PM, Pieter de Goeje wrote: > On Sunday 29 May 2011 05:01:57 m...@freebsd.org wrote: >> On Sat, May 28, 2011 at 12:03 PM, Pieter de Goeje wrote: >> > To me it looks like it's not able to cache the zeroes anymore. Is this >> > intentional? I tried to change ZERO_REGION_

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

2011-05-31 Thread mdf
On Tue, May 31, 2011 at 3:11 PM, Kenneth D. Merry wrote: > On Tue, May 31, 2011 at 15:02:37 -0700, m...@freebsd.org wrote: >> On Tue, May 31, 2011 at 2:46 PM, Kenneth D. Merry wrote: >> > On Tue, May 31, 2011 at 14:00:18 -0700, m...@freebsd.org wrote: >> >> On Tue, May 31, 2011 at 10:29 AM, Kenne

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

2011-05-31 Thread mdf
On Tue, May 31, 2011 at 2:46 PM, Kenneth D. Merry wrote: > On Tue, May 31, 2011 at 14:00:18 -0700, m...@freebsd.org wrote: >> On Tue, May 31, 2011 at 10:29 AM, Kenneth D. Merry wrote: >> > Author: ken >> > Date: Tue May 31 17:29:58 2011 >> > New Revision: 222537 >> > URL: http://svn.freebsd.org/c

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

2011-05-31 Thread mdf
On Tue, May 31, 2011 at 10:29 AM, Kenneth D. Merry wrote: > Author: ken > Date: Tue May 31 17:29:58 2011 > New Revision: 222537 > URL: http://svn.freebsd.org/changeset/base/222537 > > Log: >  Fix apparent garbage in the message buffer. > >  While we have had a fix in place (options PRINTF_BUFR_SIZ

Re: svn commit: r221853 - in head/sys: dev/md dev/null sys vm

2011-05-30 Thread mdf
On Mon, May 30, 2011 at 8:25 AM, Bruce Evans wrote: > On Sat, 28 May 2011 m...@freebsd.org wrote: > >> On Sat, May 28, 2011 at 12:03 PM, Pieter de Goeje >> wrote: >>> >>> On Friday 13 May 2011 20:48:01 Matthew D Fleming wrote: >>>> >>>&

Re: svn commit: r221853 - in head/sys: dev/md dev/null sys vm

2011-05-28 Thread mdf
On Sat, May 28, 2011 at 12:03 PM, Pieter de Goeje wrote: > On Friday 13 May 2011 20:48:01 Matthew D Fleming wrote: >> Author: mdf >> Date: Fri May 13 18:48:00 2011 >> New Revision: 221853 >> URL: http://svn.freebsd.org/changeset/base/221853 >> >> Log: >

Re: svn commit: r222084 - head/contrib/gperf/src

2011-05-18 Thread mdf
On Wed, May 18, 2011 at 2:31 PM, Dimitry Andric wrote: > On 2011-05-18 23:16, Pawel Jakub Dawidek wrote: >> >> On Wed, May 18, 2011 at 09:06:20PM +, Ben Laurie wrote: >>> >>> Author: benl >>> Date: Wed May 18 21:06:20 2011 >>> New Revision: 222084 >>> URL: http://svn.freebsd.org/changeset/base

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

2011-05-16 Thread mdf
On Mon, May 16, 2011 at 9:18 AM, Poul-Henning Kamp wrote: > Author: phk > Date: Mon May 16 16:18:40 2011 > New Revision: 221993 > URL: http://svn.freebsd.org/changeset/base/221993 > > Log: >  Change the length quantities of sbufs to be ssize_t rather than int. Why? I don't object at all to chang

Re: svn commit: r221604 - head/usr.sbin/usbdump

2011-05-07 Thread mdf
On Sat, May 7, 2011 at 9:36 AM, Hans Petter Selasky wrote: > On Saturday 07 May 2011 18:28:24 Hans Petter Selasky wrote: >>   - Use memcpy() instead of bcopy(). > > - Use memset() instead of bzero(). Why? It usually falls through to the same code in libc. Is there some standardization on memfoo

Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc

2011-04-19 Thread mdf
Trimming since I have a mostly-unrelated question... On Tue, Apr 19, 2011 at 5:40 AM, John Baldwin wrote: > On Monday, April 18, 2011 3:59:45 pm Warner Losh wrote: >> In this case, there was a new kernel thing just after, so it turned out OK. >> But let's not gratuitously bump the version since t

Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys

2011-04-18 Thread mdf
2011/4/18 Kostik Belousov : > On Mon, Apr 18, 2011 at 12:49:38PM -0700, m...@freebsd.org wrote: >> On Mon, Apr 18, 2011 at 12:28 PM, Kostik Belousov >> wrote: >> > On Mon, Apr 18, 2011 at 04:32:22PM +, Matthew D Fleming wrote: >> >> Author: mdf >> &

Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys

2011-04-18 Thread mdf
On Mon, Apr 18, 2011 at 12:47 PM, Pawel Jakub Dawidek wrote: > On Mon, Apr 18, 2011 at 10:28:10PM +0300, Kostik Belousov wrote: >> > +   if (offset + len > vap->va_size) { >> > +           VATTR_NULL(vap); >> > +           vap->va_size = offset + len; >> > +           error = VOP_SETATTR(vp, vap,

Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys

2011-04-18 Thread mdf
On Mon, Apr 18, 2011 at 12:28 PM, Kostik Belousov wrote: > On Mon, Apr 18, 2011 at 04:32:22PM +, Matthew D Fleming wrote: >> Author: mdf >> Date: Mon Apr 18 16:32:22 2011 >> New Revision: 220791 >> URL: http://svn.freebsd.org/changeset/base/220791 >> >&

Re: svn commit: r218685 - head/sys/dev/acpica

2011-02-14 Thread mdf
On Mon, Feb 14, 2011 at 10:33 AM, John Baldwin wrote: > On Monday, February 14, 2011 12:20:20 pm Matthew D Fleming wrote: >> Author: mdf >> Date: Mon Feb 14 17:20:20 2011 >> New Revision: 218685 >> URL: http://svn.freebsd.org/changeset/base/218685 >> >

Re: svn commit: r218424 - in head/sys: dev/sio kern pc98/cbus sys ufs/ffs

2011-02-08 Thread mdf
On Tue, Feb 8, 2011 at 1:18 AM, Kostik Belousov wrote: > On Tue, Feb 08, 2011 at 12:16:36AM +, Matthew D Fleming wrote: >> Author: mdf >> Date: Tue Feb  8 00:16:36 2011 >> New Revision: 218424 >> URL: http://svn.freebsd.org/changeset/base/218424 >> >> Lo

Re: svn commit: r218195 - in head/sys: amd64/amd64 arm/arm i386/i386 ia64/ia64 kern mips/mips powerpc/powerpc sparc64/sparc64 sun4v/sun4v sys ufs/ffs

2011-02-03 Thread mdf
On Thu, Feb 3, 2011 at 4:50 AM, John Baldwin wrote: > On Thursday, February 03, 2011 2:47:20 am Juli Mallett wrote: >> On Wed, Feb 2, 2011 at 08:35, Matthew D Fleming wrote: >> > Author: mdf >> > Date: Wed Feb  2 16:35:10 2011 >> > New Revision: 218195 >&g

Re: svn commit: r217830 - head/share/man/man9

2011-01-26 Thread mdf
On Wed, Jan 26, 2011 at 1:19 PM, Robert N. M. Watson wrote: > > On 26 Jan 2011, at 21:14, m...@freebsd.org wrote: > >>> The kinds of cases I worry about are things like the tcp connection >>> monitoring sysctls. Most systems have a dozen, hundred, or a thousand >>> connections. Some have half a

Re: svn commit: r217830 - head/share/man/man9

2011-01-26 Thread mdf
On Wed, Jan 26, 2011 at 1:10 PM, Robert N. M. Watson wrote: > > On 26 Jan 2011, at 18:29, m...@freebsd.org wrote: > >>> I suppose an important question is now often we see this actually failing >> >> I don't believe we've ever seen a memory failure relating to sysctls >> at Isilon and we've been u

Re: svn commit: r217830 - head/share/man/man9

2011-01-26 Thread mdf
On Wed, Jan 26, 2011 at 9:55 AM, Robert N. M. Watson wrote: > > On 26 Jan 2011, at 17:12, m...@freebsd.org wrote: > >>> Hmm.  Is this description missing mention of how wiring failures are >>> handled? (Also, it should probably mention that this call can sleep for >>> potentially quite long period

Re: svn commit: r217830 - head/share/man/man9

2011-01-26 Thread mdf
On Wed, Jan 26, 2011 at 1:37 AM, Robert Watson wrote: > On Tue, 25 Jan 2011, Matthew D Fleming wrote: > >> .Dv SBUF_AUTOEXTEND . >> .Pp >> The >> +.Fn sbuf_new_for_sysctl >> +function will set up an sbuf with a drain function to use >> +.Fn SYSCTL_OUT >> +when the internal buffer fills. >> +The sy

Re: svn commit: r217748 - head/sys/netinet/cc

2011-01-23 Thread mdf
For sbuf use for a sysctl you can use sbuf_init_for_sysctl() which will, instead of growing, push the current data out using SYSCTL_OUT to a wired user buffer. There's a few examples in the vm/ code. This can sometimes significantly simplify the code since there's no need to worry about held mute

Re: svn commit: r217369 - in head/sys: cam/scsi sys

2011-01-15 Thread mdf
On Sat, Jan 15, 2011 at 7:06 PM, Bruce Evans wrote: > On Sat, 15 Jan 2011 m...@freebsd.org wrote: >> On Sat, Jan 15, 2011 at 6:55 AM, Bruce Evans wrote: > >> The printing is done entirely in user-space, so it's not too bad.  I >> had figured to upcast everything to [u]intmax_t anyways, and what t

Re: svn commit: r217369 - in head/sys: cam/scsi sys

2011-01-15 Thread mdf
On Sat, Jan 15, 2011 at 6:55 AM, Bruce Evans wrote: > On Sat, 15 Jan 2011, Garrett Cooper wrote: > >> On Fri, Jan 14, 2011 at 10:27 PM, Bruce Evans >> wrote: >>> >>> On Fri, 14 Jan 2011, Garrett Cooper wrote: >>> On Fri, Jan 14, 2011 at 6:42 PM, Bruce Evans wrote: > > ... > Oop

Re: svn commit: r217369 - in head/sys: cam/scsi sys

2011-01-14 Thread mdf
On Thu, Jan 13, 2011 at 9:56 PM, Bruce Evans wrote: > On Thu, 13 Jan 2011, Matthew D Fleming wrote: > >> Log: >>  Add a 64-bit hex-printed sysctl(9) since there is at least one place in >>  the code that wanted it.  It is named X64 rather than XQUAD since the >>  quad name is a historical abominat

Re: svn commit: r217369 - in head/sys: cam/scsi sys

2011-01-14 Thread mdf
On Thu, Jan 13, 2011 at 10:50 PM, Bruce Evans wrote: > On Thu, 13 Jan 2011 m...@freebsd.org wrote: > >> There appear to be 330 uses of SYSCTL and QUAD on the same line in >> CURRENT.  This seems reasonable to change them to S64, U64 and X64 so >> they correctly reflect the size they operate upon.

Re: svn commit: r217369 - in head/sys: cam/scsi sys

2011-01-13 Thread mdf
; Author: mdf > Date: Thu Jan 13 18:20:33 2011 > New Revision: 217369 > URL: http://svn.freebsd.org/changeset/base/217369 > > Log: >  Add a 64-bit hex-printed sysctl(9) since there is at least one place in >  the code that wanted it.  It is named X64 rather than XQUAD since the

Re: svn commit: r217330 - head/sys/x86/x86

2011-01-12 Thread mdf
On Wed, Jan 12, 2011 at 4:06 PM, Bruce Evans wrote: > On Wed, 12 Jan 2011, John Baldwin wrote: > >>> Log: >>>  Fix a brain fart.  Since this file is shared between i386 and amd64, a >>>  bus_size_t may be 32 or 64 bits.  Change the bounce_zone alignment field >>>  to explicitly be 32 bits, as I ca

Re: svn commit: r217330 - head/sys/x86/x86

2011-01-12 Thread mdf
On Wed, Jan 12, 2011 at 1:21 PM, John Baldwin wrote: > On Wednesday, January 12, 2011 4:08:50 pm Matthew D Fleming wrote: >> Author: mdf >> Date: Wed Jan 12 21:08:49 2011 >> New Revision: 217330 >> URL: http://svn.freebsd.org/changeset/base/217330 >> >>

Re: svn commit: r217269 - in stable/8/sys: kern sys

2011-01-11 Thread mdf
Gah! Forgot to mention this is a MFC of r216616. On Tue, Jan 11, 2011 at 9:26 AM, Matthew D Fleming wrote: > Author: mdf > Date: Tue Jan 11 17:26:36 2011 > New Revision: 217269 > URL: http://svn.freebsd.org/changeset/base/217269 > > Log: >  Move the fail_point_entry defi

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

2010-12-21 Thread mdf
On Tue, Dec 21, 2010 at 8:52 AM, Stefan Farfeleder wrote: > On Tue, Dec 21, 2010 at 04:29:58PM +, Matthew D Fleming wrote: >> Author: mdf >> Date: Tue Dec 21 16:29:58 2010 >> New Revision: 216616 >> URL: http://svn.freebsd.org/changeset/base/216616 >> >&

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

2010-12-21 Thread mdf
On Tue, Dec 21, 2010 at 8:29 AM, Matthew D Fleming wrote: > Author: mdf > Date: Tue Dec 21 16:29:58 2010 > New Revision: 216616 > URL: http://svn.freebsd.org/changeset/base/216616 > > Log: >  Move the fail_point_entry definition from fail.h to kern_fail.c, which >  allows

Re: svn commit: r216016 - head/sys/sparc64/include

2010-12-07 Thread mdf
On Tue, Dec 7, 2010 at 5:41 AM, Marius Strobl wrote: > On Mon, Dec 06, 2010 at 02:30:01PM -0800, m...@freebsd.org wrote: >> On Mon, Dec 6, 2010 at 2:07 PM, Marius Strobl >> wrote: >> [lots of snip] >> >> > With that one the kernel now survies memguard_init() but then panics >> > right afterwards

Re: svn commit: r216016 - head/sys/sparc64/include

2010-12-06 Thread mdf
On Mon, Dec 6, 2010 at 2:07 PM, Marius Strobl wrote: [lots of snip] > With that one the kernel now survies memguard_init() but then panics > right afterwards when kmeminit() calls kmem_suballoc(): > KDB: debugger backends: ddb > KDB: current backend: ddb > Copyright (c) 1992-2010 The FreeBSD Proj

Re: svn commit: r216161 - in head/sys: amd64/amd64 i386/i386

2010-12-03 Thread mdf
On Fri, Dec 3, 2010 at 1:54 PM, Jung-uk Kim wrote: > Author: jkim > Date: Fri Dec  3 21:54:10 2010 > New Revision: 216161 > URL: http://svn.freebsd.org/changeset/base/216161 > > Log: >  Explicitly initialize TSC frequency.  To calibrate TSC frequency, we use >  DELAY(9) and it may use TSC in turn

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

2010-10-01 Thread mdf
On Fri, Oct 1, 2010 at 9:34 AM, Andriy Gapon wrote: > Author: avg > Date: Fri Oct  1 09:34:41 2010 > New Revision: 213322 > URL: http://svn.freebsd.org/changeset/base/213322 > > Log: >  sysctls in kern_shutdown: add twin tunables > >  also make couple of sysctl-controlled variables static > >  Rev

Re: svn commit: r213305 - in head/sys: gdb kern sys

2010-09-30 Thread mdf
On Thu, Sep 30, 2010 at 10:05 AM, Andriy Gapon wrote: > Author: avg > Date: Thu Sep 30 17:05:23 2010 > New Revision: 213305 > URL: http://svn.freebsd.org/changeset/base/213305 > > Log: >  there must be only one SYSINIT with SI_SUB_RUN_SCHEDULER+SI_ORDER_ANY order > >  SI_SUB_RUN_SCHEDULER+SI_ORDER

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

2010-09-21 Thread mdf
On Tue, Sep 21, 2010 at 9:50 AM, John Baldwin wrote: > On Tuesday, September 21, 2010 12:31:01 pm m...@freebsd.org wrote: >> On Tue, Sep 21, 2010 at 8:40 AM, Andriy Gapon wrote: >> > on 21/09/2010 18:27 Andriy Gapon said the following: >> >> on 21/09/2010 18:17 m...@freebsd.org said the following

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

2010-09-21 Thread mdf
On Tue, Sep 21, 2010 at 9:36 AM, Andriy Gapon wrote: > on 21/09/2010 19:31 m...@freebsd.org said the following: >> I keep forgetting, but actually _mtx_lock_sleep() will just return if >> panicstr is set.  _mtx_assert() is similarly guarded, so actually it >> should be mostly okay. > > But this do

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

2010-09-21 Thread mdf
On Tue, Sep 21, 2010 at 8:40 AM, Andriy Gapon wrote: > on 21/09/2010 18:27 Andriy Gapon said the following: >> on 21/09/2010 18:17 m...@freebsd.org said the following: >>> >>> I'd recommend using stack_print_ddb(), as that avoids any locking >>> which may hang depending on how the kernel panic'd.

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

2010-09-21 Thread mdf
On Tue, Sep 21, 2010 at 8:07 AM, 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_T

Re: svn commit: r212439 - head/sys/fs/nfs

2010-09-11 Thread mdf
On Sun, Sep 12, 2010 at 12:41 AM, Rick Macklem wrote: >> Then, fid_reserved is no more reserved ? Should we rename it ? >> >> Comment for fid_reserved about longword alignment is wrong. > > Well, it's actually more broken than that. > fid_len - Most file systems set it to the size of their variant

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

2010-09-11 Thread mdf
On Sat, Sep 11, 2010 at 7:42 PM, Alexander Kabaev wrote: > Author: kan > Date: Sat Sep 11 19:42:50 2010 > New Revision: 212478 > URL: http://svn.freebsd.org/changeset/base/212478 > > Log: >  Add missing pointer increment to sbuf_cat. > > Modified: >  head/sys/kern/subr_sbuf.c > > Modified: head/sy

Re: svn commit: r212368 - head/sys/dev/pci

2010-09-09 Thread mdf
On Thu, Sep 9, 2010 at 11:19 AM, John Baldwin wrote: > Author: jhb > Date: Thu Sep  9 18:19:15 2010 > New Revision: 212368 > URL: http://svn.freebsd.org/changeset/base/212368 > > Log: >  - Rename the constant for the Master Data Parity Error flag in the >    PCI status register to map its current

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

2010-09-06 Thread mdf
On Mon, Sep 6, 2010 at 6:45 AM, Bruce Evans wrote: > On Fri, 3 Sep 2010, pluknet wrote: > >> On 3 September 2010 21:23, Matthew D Fleming wrote: >>> >>> Log: >>>  Fix user-space libsbuf build.  Why isn't CTASSERT available to >>>  user-space? > > Well, user headers shouldn't be enlisted to check

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

2010-09-03 Thread mdf
On Fri, Sep 3, 2010 at 10:23 AM, Matthew D Fleming wrote: > Author: mdf > Date: Fri Sep  3 17:23:26 2010 > New Revision: 212182 > URL: http://svn.freebsd.org/changeset/base/212182 > > Log: >  Fix user-space libsbuf build.  Why isn't CTASSERT available to >  user-space

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

2010-09-02 Thread mdf
On Thu, Sep 2, 2010 at 9:23 AM, Matthew D Fleming wrote: > Author: mdf > Date: Thu Sep  2 16:23:05 2010 > New Revision: 212153 > URL: http://svn.freebsd.org/changeset/base/212153 > > Log: >  Fix UP build. Noticed by b.f. (bf1783 at gmail dot com) We apologize for the i

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

2010-09-01 Thread mdf
On Wed, Sep 1, 2010 at 2:31 PM, John Baldwin wrote: > On Wednesday, September 01, 2010 4:32:48 pm Matthew D Fleming wrote: >> Author: mdf >> Date: Wed Sep  1 20:32:47 2010 >> New Revision: 212115 >> URL: http://svn.freebsd.org/changeset/base/212115 >> >>

Re: svn commit: r211463 - head/usr.bin/grep

2010-08-18 Thread mdf
On Wed, Aug 18, 2010 at 10:40 AM, Gabor Kovesdan wrote: > Author: gabor > Date: Wed Aug 18 17:40:10 2010 > New Revision: 211463 > URL: http://svn.freebsd.org/changeset/base/211463 > > Log: >  - Refactor file reading code to use pure syscalls and an internal buffer >    instead of stdio.  This give

Re: svn commit: r211304 - head/lib/libutil

2010-08-14 Thread mdf
On Sat, Aug 14, 2010 at 2:34 PM, Dag-Erling Smorgrav wrote: > Author: des > Date: Sat Aug 14 14:34:36 2010 > New Revision: 211304 > URL: http://svn.freebsd.org/changeset/base/211304 > > Log: >  Simplify expand_number() by combining the (unrolled) loop with the >  switch.  Since expand_number() doe

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

2010-08-13 Thread mdf
On Fri, Aug 13, 2010 at 12:20 PM, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Fri Aug 13 19:20:35 2010 > New Revision: 211284 > URL: http://svn.freebsd.org/changeset/base/211284 > > Log: >  Simplify taskqueue_drain() by using proved macros. Thanks! This was on my to-do list since I'd been i

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

2010-08-12 Thread mdf
On Thu, Aug 12, 2010 at 9:13 AM, Jung-uk Kim wrote: > Author: jkim > Date: Thu Aug 12 16:13:24 2010 > New Revision: 211228 > URL: http://svn.freebsd.org/changeset/base/211228 > > Log: >  Provide description for 'machdep.disable_rtc_set' sysctl.  Clean up style(9) >  nits.  Remove a redundant retur

Re: svn commit: r209578 - head/sys/sys

2010-06-29 Thread mdf
2010/6/29 Kostik Belousov : > On Mon, Jun 28, 2010 at 02:07:02PM -0700, Matthew Fleming wrote: >> On Mon, Jun 28, 2010 at 10:59 AM, Konstantin Belousov >> wrote: >> > Author: kib >> > Date: Mon Jun 28 17:59:45 2010 >> > New Revision: 209578 >> > URL: http://svn.freebsd.org/changeset/base/209578 >

Re: svn commit: r209119 - head/sys/sys

2010-06-14 Thread mdf
> BTW, one reason I liked BSD code more than gnu code is that it didn't > use so many macros.  Macros should only exist when they are not just > syntactic sugar, like DPCPU_SUM() and unlike CPU_FOREACH(). As a style question, I do understand (generally) why too many macros make the code confusing.

Re: svn commit: r209119 - head/sys/sys

2010-06-13 Thread mdf
On Sun, Jun 13, 2010 at 10:10 AM, Pawel Jakub Dawidek wrote: > On Sun, Jun 13, 2010 at 02:39:55AM +, Lawrence Stewart wrote: >> Author: lstewart >> Date: Sun Jun 13 02:39:55 2010 >> New Revision: 209119 >> URL: http://svn.freebsd.org/changeset/base/209119 >> >> Log: >>   Add a utility macro to