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

Lawrence Stewart lstewart at freebsd.org
Mon Jan 24 07:11:51 UTC 2011


Hi Matthew,

On 01/24/11 02:39, mdf at FreeBSD.org wrote:
> For sbuf use for a sysctl you can use sbuf_init_for_sysctl() which

I assume you mean sbuf_new_for_sysctl() that's in kern/kern_sysctl.c? It
would be useful to document this function in sbuf(9) - I wasn't aware of
it and didn't find it when I went looking how to do what my patch
somewhat hackishly achieves.

> 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 mutex/rwlock anymore.

I need to MFC the work my patch is against at some point... if/when you
MFC the sbuf_set_drain() and sbuf_new_for_sysctl() patches, I'll be
happy to switch to using sbuf_new_for_sysctl(). I'll wait until the MFC
is done though before switching.

Cheers,
Lawrence


More information about the svn-src-all mailing list