From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 30 18:52:26 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21CA31065674 for ; Thu, 30 Sep 2010 18:52:26 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6241E8FC1E for ; Thu, 30 Sep 2010 18:52:21 +0000 (UTC) Received: by gwb15 with SMTP id 15so1115749gwb.13 for ; Thu, 30 Sep 2010 11:52:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=IdIFXcQeZg50CGb06C5Dh9rgMe9OLBBuTq9VvHh+CUU=; b=uOQ5jL2O2mi+Bt0VnsqbAF5b7DMF4XC7uCxwew8z5Zuv702ZxzAZyrep6iGw1/Jk+C C0XSQhJSmy2VOeX2SW3Gi0gN6osHZ7n4/SpVE9RLPRMbXGOo96PSbKTfvdyCQkWopp6v Fux0dDTTTFI6OJXnda4MiXEqRsx++TFDoIGTU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=ayzdkuQLBTIiBYcX9lVhxN7+Efe8WuHtw/0QoBKcXIpbPVZqOwv5ac24wQkknnysaB i4TGa7967MBmcN9zWyXWsRoEoa9+k8RNNqMp01BQzhGv01XVaQlcVWn7owrpB004Bst5 iuoO7kzq+9NrWdhUuzgjj4pTp5WZhMqeE55Qc= MIME-Version: 1.0 Received: by 10.231.38.9 with SMTP id z9mr4255930ibd.24.1285872740277; Thu, 30 Sep 2010 11:52:20 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.231.190.68 with HTTP; Thu, 30 Sep 2010 11:52:20 -0700 (PDT) In-Reply-To: <4CA4C63F.4070503@icyb.net.ua> References: <4CA4C63F.4070503@icyb.net.ua> Date: Thu, 30 Sep 2010 11:52:20 -0700 X-Google-Sender-Auth: _0v0aG8OcRR58-DZGBrSqUndDDk Message-ID: From: Garrett Cooper To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: sysctl for querying kmem_map->size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Sep 2010 18:52:26 -0000 On Thu, Sep 30, 2010 at 10:17 AM, Andriy Gapon 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