Date: Thu, 30 Sep 2010 11:52:20 -0700 From: Garrett Cooper <gcooper@FreeBSD.org> To: Andriy Gapon <avg@icyb.net.ua> Cc: freebsd-hackers@freebsd.org Subject: Re: sysctl for querying kmem_map->size Message-ID: <AANLkTikdrG-LuaoyRmYDdZustcB3%2Bt5JAkt03Un5vTgU@mail.gmail.com> In-Reply-To: <4CA4C63F.4070503@icyb.net.ua> References: <4CA4C63F.4070503@icyb.net.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 30, 2010 at 10:17 AM, Andriy Gapon <avg@icyb.net.ua> wrote: > > Here's a patch that adds a sysctl for querying kmem_map->size, which may be useful > for system state/resources monitoring: > http://people.freebsd.org/~avg/sysctl-kmem_map_size.diff > > I am quite unsure about sizeof(kmem_map->size) == sizeof(int) hack, but I couldn't > think of other way to decide whether to use SYSCTL_ADD_UINT or SYSCTL_ADD_ULONG > depending on real type behind vm_size_t. Is the base value of the field size_t? If so, then it's ulong on 64-bit archs and uint on 32-bit archs. Maybe it's a good time then to actually get the sysctl and tunables work that I started on into base. I have a functioning and tested copy of the tunables work, but I'll need to do similar for the sysctls as well (des@ and I kind of got out of sync a few months back). Thanks, -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikdrG-LuaoyRmYDdZustcB3%2Bt5JAkt03Un5vTgU>
