Re: Change top's notion of idle processes / threads

看板FB_current作者時間11年前 (2014/05/28 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串8/15 (看更多)
On 26 May 2014 11:51, Ed Maste <emaste@freebsd.org> wrote: > > 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. That said, I've discovered an issue with the change after using it a bit more, when using -I on the command line. (Previously I only tried it by pressing I in interactive mode.) With the change top -I lists all processes at first (which is a little annoying), but it renders -I ineffective when used with -b (batch mode). What do you think about this additional change, so that we use the previous 0% idleness test for the first iteration of the list: if (oldp == NULL) - return (pp->ki_runtime != 0); + return (pp->ki_pctcpu != 0); -Ed _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1JXDBVSC (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1JXDBVSC (FB_current)