From nobody@FreeBSD.org  Wed Jul  6 00:47:12 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 819341065678
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  6 Jul 2011 00:47:12 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 5A72F8FC20
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  6 Jul 2011 00:47:12 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p660lCXK005706
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 6 Jul 2011 00:47:12 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p660lCi9005705;
	Wed, 6 Jul 2011 00:47:12 GMT
	(envelope-from nobody)
Message-Id: <201107060047.p660lCi9005705@red.freebsd.org>
Date: Wed, 6 Jul 2011 00:47:12 GMT
From: Alexander Best <arundel@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: top(1) ignoring -z option in 'io' mode
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         158677
>Category:       bin
>Synopsis:       top(1) ignoring -z option in 'io' mode
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jhb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 06 00:50:04 UTC 2011
>Closed-Date:    Thu Jul 14 19:10:12 UTC 2011
>Last-Modified:  Thu Jul 14 19:10:12 UTC 2011
>Originator:     Alexander Best
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD otaku 9.0-CURRENT FreeBSD 9.0-CURRENT #19 r223802=64379d4-dirty: Wed Jul  6 01:59:56 CEST 2011     arundel@otaku:/usr/obj/usr/git-freebsd-head/sys/ARUNDEL  amd64
>Description:
when executing top in 'io' mode, the -z option as well as the interactive z key seem to be a nop. the idle process gets always displayed.

cheers.
alex
>How-To-Repeat:
'top -mio -S -z' shouldn't display the idle process, yet it does.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jhb 
Responsible-Changed-By: arundel 
Responsible-Changed-When: Wed Jul 6 08:59:12 UTC 2011 
Responsible-Changed-Why:  
Hi John, 

since you were the one who implemented the -z flag, could you take a look at 
this PR? 

Thanks. 
Alex 

http://www.freebsd.org/cgi/query-pr.cgi?pr=158677 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/158677: commit references a PR
Date: Thu,  7 Jul 2011 13:38:05 +0000 (UTC)

 Author: jhb
 Date: Thu Jul  7 13:37:46 2011
 New Revision: 223841
 URL: http://svn.freebsd.org/changeset/base/223841
 
 Log:
   Always skip the kernel idle process if requested, it is not specific to
   the 'CPU' mode.
   
   PR:		bin/158677
   Reported by:	arundel
   MFC after:	3 days
 
 Modified:
   head/usr.bin/top/machine.c
 
 Modified: head/usr.bin/top/machine.c
 ==============================================================================
 --- head/usr.bin/top/machine.c	Thu Jul  7 11:59:51 2011	(r223840)
 +++ head/usr.bin/top/machine.c	Thu Jul  7 13:37:46 2011	(r223841)
 @@ -701,17 +701,16 @@ get_process_info(struct system_info *si,
  			/* skip zombies */
  			continue;
  
 +		if (!show_kidle && pp->ki_tdflags & TDF_IDLETD)
 +			/* skip kernel idle process */
 +			continue;
 +		    
  		if (displaymode == DISP_CPU && !show_idle &&
  		    (pp->ki_pctcpu == 0 ||
  		     pp->ki_stat == SSTOP || pp->ki_stat == SIDL))
  			/* skip idle or non-running processes */
  			continue;
  
 -		if (displaymode == DISP_CPU && !show_kidle &&
 -		    pp->ki_tdflags & TDF_IDLETD)
 -			/* skip kernel idle process */
 -			continue;
 -		    
  		if (displaymode == DISP_IO && !show_idle && p_io == 0)
  			/* skip processes that aren't doing I/O */
  			continue;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: jhb 
State-Changed-When: Thu Jul 7 13:45:51 UTC 2011 
State-Changed-Why:  
Fix committed to HEAD. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=158677 
State-Changed-From-To: patched->closed 
State-Changed-By: jhb 
State-Changed-When: Thu Jul 14 19:09:58 UTC 2011 
State-Changed-Why:  
Fix merged to 8. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=158677 
>Unformatted:
