From owner-freebsd-current@FreeBSD.ORG Sat Jul 16 11:42:53 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0241106564A; Sat, 16 Jul 2011 11:42:53 +0000 (UTC) (envelope-from inyaoo@gmail.com) Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0395C8FC12; Sat, 16 Jul 2011 11:42:52 +0000 (UTC) Received: by fxe6 with SMTP id 6so3093381fxe.17 for ; Sat, 16 Jul 2011 04:42:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version:content-type; bh=2ItImmKpt0N/AU8vVGvrJ7n0HEFCQSW+7ov4Qr2FAh0=; b=Ongw4eAMZtSSX910D+L1HNy0C7E9KUbr2/YSukH/tWLhHkhff+WVPu/pwkTGZZS2uk EimbpUWn5N0b2VI3W3CHufnbKpoPrrwFowjtVexH1gO/2tQVGtSKPgu978K/0yGhjb3u KRGR0XHWE2Egm544t3KPYkc+enPJNgGI+SLLM= Received: by 10.223.98.88 with SMTP id p24mr2543132fan.72.1310814994414; Sat, 16 Jul 2011 04:16:34 -0700 (PDT) Received: from localhost (tor-exit-router35-readme.formlessnetworking.net [199.48.147.35]) by mx.google.com with ESMTPS id 9sm1416640far.13.2011.07.16.04.16.31 (version=SSLv3 cipher=OTHER); Sat, 16 Jul 2011 04:16:33 -0700 (PDT) From: Pan Tsu To: Alexander Best References: <201107151343.40065.jhb@freebsd.org> <20110716093445.GA15357@freebsd.org> Date: Sat, 16 Jul 2011 15:16:20 +0400 Message-ID: <864o2mfpbv.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: current@freebsd.org Subject: Re: [PATCH] Export per-thread resource usage via sysctl X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jul 2011 11:42:53 -0000 Alexander Best writes: > On Fri Jul 15 11, John Baldwin wrote: >> This change exports each individual thread's resource usage via sysctl when >> individual threads are requested via KERN_PROC_INC_THREAD. This generally >> works correctly with 'top -m io' after the previous change to revert top(1) >> back to using KERN_PROC_PROC when threads are not enabled. There is one issue >> in that top doesn't necessarily DTRT when disabling/enabling threads via 'H' >> at runtime while in io mode. I may do some further work to clean that up. >> However, for just top run it will now show per-thread stats instead of >> duplicating the per-process stats for each thread. > > i'm not sure, if i understand what the patch is supposed to do. however after > applying it, and recompiling/reinstalling the kernel, 'top -mio' displays the > same stats for each thread of a process. if i understood you correctly, each > thread should have individual stats. > > i'm running r224068 on amd64 and just reinstalled 'top'. anything i am missing? FWIW, I see different numbers for a few threads of firefox-bin with top-3.8b1. http://img233.imageshack.us/img233/1570/81482202.png Which is an improvement compared to how all threads showed same numbers before applying the patch.