From owner-freebsd-current@FreeBSD.ORG Mon May 26 15:52:00 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 625599D1; Mon, 26 May 2014 15:52:00 +0000 (UTC) Received: from mail-qg0-x22d.google.com (mail-qg0-x22d.google.com [IPv6:2607:f8b0:400d:c04::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 03C08217E; Mon, 26 May 2014 15:51:59 +0000 (UTC) Received: by mail-qg0-f45.google.com with SMTP id z60so12298448qgd.32 for ; Mon, 26 May 2014 08:51:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=3VdWfjNTqYMmc1sqcNM1CX4Rg3NAo8e0q3ECzCKbeIM=; b=gMjaLamsVkfcpEqwt0rnpTm91Df4qSRw8UzT453Mhy5BYOYwBB5qMtwWSf6KiVJGLb FY0NHMeKkZPaSCwKDwubRdPYryYLsiRuV/1QU+ypPtIuGUQJM3L9XuPAX1otTxen+1wI ihVBob1IysCulxZ+xMmpqzlrvfcLZbAuMfWt6BJ68K8bYO6yeE6YMM2hiFaX/RxXvjnn +ab/nTxPZ8Vf9j97UtPDHcLbWwB5o048o5DMZaVYclZJInIr3/TanR4b2Qoz7Qap3Ph7 qeZiuuIPLJUu8f0AioZJzKXbhH+/vWPO0R2X716Fo0tPPxsXqu4LOPId9skAS/LDY5C5 +1+Q== MIME-Version: 1.0 X-Received: by 10.224.40.76 with SMTP id j12mr33468297qae.90.1401119519180; Mon, 26 May 2014 08:51:59 -0700 (PDT) Sender: carpeddiem@gmail.com Received: by 10.140.49.239 with HTTP; Mon, 26 May 2014 08:51:59 -0700 (PDT) In-Reply-To: <53819789.8030304@FreeBSD.org> References: <201405231605.26312.jhb@freebsd.org> <537FBC1F.6030408@freebsd.org> <53819789.8030304@FreeBSD.org> Date: Mon, 26 May 2014 11:51:59 -0400 X-Google-Sender-Auth: b0G09c7IuwWDWj6xt9tzx60n6ek Message-ID: Subject: Re: Change top's notion of idle processes / threads From: Ed Maste To: koobs@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD Current , Allan Jude X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 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: Mon, 26 May 2014 15:52:00 -0000 On 25 May 2014 03:11, Kubilay Kocak wrote: > On 24/05/2014 7:22 AM, Allan Jude wrote: > >> I think this makes good sense. I would definitely prefer it. Would it >> make sense to maybe preserve the old behaviour behind a command line flag? >> > > And an update to top(8) reflecting the algo :)I know these little > esoteric things could always do with more obvious breadcrumbs (like load > average calcs, etc) for our future selves and others. > > +1 on the behavior change, not sure about retaining the old under a > flag. Who might benefit from it? How do other OS top implementations > calculate their idle? If there's other examples out there with the same > (current) algo, then retaining compat might be worth it, such as for > newly converted users The change in the patch is good, the new behaviour is much more usable. Note that we don't currently define "idle" in top(8); for this change maybe we should just state that non-idle processes may report 0% CPU due to rounding. A flag for the old behaviour seems like a bad idea. We already have an adequate supply of knobs and modes and options that don't provide real value, and just add work for our users to determine if they should be set or not. -Ed