From owner-freebsd-current@freebsd.org Mon Dec 24 21:50:16 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6E8113504E8 for ; Mon, 24 Dec 2018 21:50:15 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 931AD6E0E2 for ; Mon, 24 Dec 2018 21:50:13 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A419221FF3; Mon, 24 Dec 2018 16:50:07 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 24 Dec 2018 16:50:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.net; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=fm3; bh=I2QELrzpdif/eIEy7plZpvLAlMh 7YJZ3prRVSXl7gQ4=; b=p9O0kg0rZasqZlsplOC+S/UKYq8kTeXFjaZQJK8/inm vfSteywFuNby2O7E0VRi8IpuSpCIYty6uIScuHNXXV2FQzEvITRy3fZC9ok9Uqx2 yZ08Dtm5jdm3KUOLLZ9vIEaOMevVu/vyNMmnvan6sl4dtgVCKaiVN3DEZXYi65XL hcH+WqlodLgjoJ5OGrOXcUjlofcOmYjgjhSuMxgznDQauGp3wcThdJcdeMpx+Tf0 P31rThoPu5VtGWjOxa+xaCcv8BExwyKiOQCc6butI8G9GG69aOewXONNeL5YYMuA xu+XHU+ZAjeP4mOWkQL07FsIyy7ulViCVA9CjvwdgRw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=I2QELr zpdif/eIEy7plZpvLAlMh7YJZ3prRVSXl7gQ4=; b=lNXWhv8ulBZAnJNKKmVy+7 clm0+CCwVz6rzUyrfrPrGr751/5AaeGmvQ4GsBCYkw+UwrL8dX7vTdjBI7QNbLyE WLPmxMTpRoVP3TvIBgBrAhwHEBVd6ZnOZhQQJjKkgVQ3OK94SOf+691yjW2MPofL 7z+jGhkTMqSVhsue2FTpGEBNugWLCsAFWuxrBr/9b1clWsnbSvNA0pJAS33o8Tpi IxP/kqA73Sf7RI5mqVpMhsF/LQjayMHsXUrNnDNJZ8PFCgXjnqtLllmk4T2Rh39s T82vqUf+GzRjmKh53osHpnyKetyEab2+oI7gUk3yI6gU825oNbNpvVq0weNDIrVw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudekuddgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecu fedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepuffvfhfhkf fffgggjggtsehgtderofdtfeejnecuhfhrohhmpegjuhhrihcurfgrnhhkohhvuceohihu rhhiphhvseihuhhrihhpvhdrnhgvtheqnecukfhppeeivddrudekfedruddvgedrieelne curfgrrhgrmhepmhgrihhlfhhrohhmpeihuhhrihhpvheshihurhhiphhvrdhnvghtnecu vehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.2] (unknown [62.183.124.69]) by mail.messagingengine.com (Postfix) with ESMTPA id 6A67FE4385; Mon, 24 Dec 2018 16:50:05 -0500 (EST) Subject: Re: head -r3418363: top -opid process list order is rather odd (top -Saopid example shown) To: Mark Millard , FreeBSD Current References: <6C9BDD8A-7889-4819-86E3-CE13AC3323AC@yahoo.com> From: Yuri Pankov Open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CF1rWOD+ymOWw+VLllOkrHcZa5PJtX9UOGbApZl8ZTM8El4CA NN8F1bg9MWzUi+8LYoGWGc+BwsFS1OUB1c4SPgMu5fD4Wfsr9yRl06fdpEA2YT7B/j5/5RSC 0sE2Zs/tmJ/JRflHJ12ycj59ma2xQMfEJF40hZDpMFQmZvbVqgEg3ocQcltjbxlIKZ/mjC4z ABEBAAGJATwEGAEKACYWIQT4arc+w94tPi0v/3CTi+B/sSrhbAUCW7y7ogIbDAUJBaOagAAK CRCTi+B/sSrhbIDcCACqAZMcoxUBLZa40a5b24j5i1jplvCYYb3h+Q5lt5+BFJ87kCb4dJuU D3kh2i29BrxWQWa9WNue9ozxeYkbkfXubQYXexVolRsnh64OdGsE8KvorBFBB3zdK/GRt2Jy +jsnTfUWuQllbzMP0MfhCDMk1Mo8WvDH2/cOEP/yLKf20a+cd6nLs7bidjmGXo9pyuBKAtV6 Kv+VRu54AL+A/UBYu/eB3Dtvzcnut+1Zq6KaP++kUwPwINLIk04OBDwN0zRNTiqMAFYYyz2v ZHBB6E1th/l//ZC5b9Dk0ZpFI1bYdL9ymnrZe1MqbGPnDCToQxu00T/pZCm6Z92YrZQYuNwl Message-ID: Date: Tue, 25 Dec 2018 00:49:55 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <6C9BDD8A-7889-4819-86E3-CE13AC3323AC@yahoo.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OZCSiGraN9rwUmIzmMyxM4bI8TB3I95oQ" X-Rspamd-Queue-Id: 931AD6E0E2 X-Spamd-Bar: --------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yuripv.net header.s=fm3 header.b=p9O0kg0r; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=lNXWhv8u; spf=pass (mx1.freebsd.org: domain of yuripv@yuripv.net designates 66.111.4.25 as permitted sender) smtp.mailfrom=yuripv@yuripv.net X-Spamd-Result: default: False [-9.11 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.25]; HAS_ATTACHMENT(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yuripv.net:+,messagingengine.com:+]; RCPT_COUNT_TWO(0.00)[2]; MIME_BASE64_TEXT(0.10)[]; MX_GOOD(-0.01)[in2-smtp.messagingengine.com,in1-smtp.messagingengine.com,in2-smtp.messagingengine.com,in1-smtp.messagingengine.com]; SIGNED_PGP(-2.00)[]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:+,4:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[25.4.111.66.list.dnswl.org : 127.0.5.1]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[yuripv.net:s=fm3,messagingengine.com:s=fm1]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_SHORT(-0.93)[-0.928,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; DMARC_NA(0.00)[yuripv.net]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(-3.58)[ip: (-9.38), ipnet: 66.111.4.0/24(-4.64), asn: 11403(-3.77), country: US(-0.08)] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 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, 24 Dec 2018 21:50:16 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --OZCSiGraN9rwUmIzmMyxM4bI8TB3I95oQ Content-Type: multipart/mixed; boundary="K4MnkbIq1kvZZv22F6YB8GUEIr17WrPN7"; protected-headers="v1" From: Yuri Pankov To: Mark Millard , FreeBSD Current Message-ID: Subject: Re: head -r3418363: top -opid process list order is rather odd (top -Saopid example shown) References: <6C9BDD8A-7889-4819-86E3-CE13AC3323AC@yahoo.com> In-Reply-To: <6C9BDD8A-7889-4819-86E3-CE13AC3323AC@yahoo.com> --K4MnkbIq1kvZZv22F6YB8GUEIr17WrPN7 Content-Type: multipart/mixed; boundary="------------A4141C8AEDD6A05DB767ECDD" Content-Language: en-US This is a multi-part message in MIME format. --------------A4141C8AEDD6A05DB767ECDD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mark Millard wrote: > From my from=3Dsource head -r3418363 context, top with -opid does not > seem to sort in a coherent order, not time of process creation order > (either direction) and not in just-PID numeric order (either > direction). For example: >=20 > PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU = COMMAND > 0 root 24 -16 - 0 368K swapin 1 0:00 0.00% = [kernel] > 16 root 1 -16 - 0 16K - 3 0:00 0.00% = [soaiod2] > 752 root 1 20 0 18M 18M select 1 0:07 0.01% = /usr/sbin/ntpd -p /var/db/ntp/ntpd.pid -c /etc/ntp.conf -g > 800 root 1 20 0 11M 908K nanslp 1 0:01 0.00% = /usr/sbin/cron -s > 1 root 1 20 0 9900K 132K wait 3 0:00 0.00% = [init] > 17 root 1 -16 - 0 16K - 0 0:00 0.00% = [soaiod3] > 2 root 1 -16 - 0 16K crypto 0 0:00 0.00% = [crypto] > 18 root 1 -16 - 0 16K - 0 0:00 0.00% = [soaiod4] > 850 root 1 20 0 13M 2756K wait 3 0:00 0.00% = login [pam] (login) > 3 root 1 -16 - 0 16K crypto 0 0:00 0.00% = [crypto returns 0] > 19 root 1 -16 - 0 16K mmcsd 0 0:25 0.00% = [mmcsd0: mmc/sd card] > 643 root 1 20 0 11M 1124K select 2 0:01 0.00% = /usr/sbin/syslogd -s > 4 root 1 -16 - 0 16K crypto 0 0:00 0.00% = [crypto returns 1] > 20 root 1 -16 - 0 16K mmcsd 0 0:00 0.00% = [mmcsd0boot0: mmc/sd] > 5 root 1 -16 - 0 16K crypto 0 0:00 0.00% = [crypto returns 2] > 21 root 1 -16 - 0 16K mmcsd 0 0:00 0.00% = [mmcsd0boot1: mmc/sd] > 6 root 1 -16 - 0 16K crypto 0 0:00 0.00% = [crypto returns 3] > 22 root 3 -16 - 0 48K psleep 3 0:12 0.00% = [pagedaemon] > 5270 root 1 20 0 14M 3780K CPU2 2 0:00 0.14% = top -Saopid > 662 root 1 20 0 11M 680K select 0 0:00 0.00% = /usr/sbin/rpcbind > 7 root 2 -16 - 0 32K - 0 0:00 0.00% = [cam] > 23 root 1 -16 - 0 16K psleep 2 0:00 0.00% = [vmdaemon] > 5255 root 1 20 0 12M 3092K wait 0 0:00 0.00% = -sh (sh) > 8 root 1 -16 - 0 16K waitin 0 0:00 0.00% = [sctp_iterator] > 24 root 3 -16 - 0 48K qsleep 3 0:12 0.01% = [bufdaemon] > 712 root 1 52 0 12M 616K select 0 0:00 0.00% = /usr/sbin/mountd -r > 9 root 1 -16 - 0 16K - 1 0:04 0.00% = [rand_harvestq] > 25 root 1 20 - 0 16K vlruwt 0 0:04 0.00% = [vnlru] > 10 root 1 -16 - 0 16K audit_ 0 0:00 0.00% = [audit] > 26 root 1 16 - 0 16K syncer 0 1:45 0.00% = [syncer] > 714 root 1 52 0 12M 728K select 3 0:00 0.00% = nfsd: master (nfsd) > 11 root 4 155 ki31 0 64K CPU0 0 144.6H 397.09% = [idle] > 235 root 1 20 0 11M 564K select 3 0:00 0.00% = dhclient: system.syslog (dhclient) > 715 root 32 52 0 11M 1120K rpcsvc 3 0:00 0.00% = nfsd: server (nfsd) > 12 root 18 -52 - 0 288K WAIT 2 2:29 1.43% = [intr] > 412 root 1 20 0 10M 72K select 2 0:00 0.00% = /sbin/devd > 796 root 1 52 0 20M 672K select 0 0:00 0.00% = /usr/sbin/sshd > 13 root 3 -8 - 0 48K - 1 0:11 0.00% = [geom] > 14 root 20 -68 - 0 320K - 0 0:02 0.00% = [usb] > 238 root 1 52 0 12M 416K select 1 0:00 0.00% = dhclient: awg0 [priv] (dhclient) > 15 root 1 -16 - 0 16K - 0 0:00 0.00% = [soaiod1] > 239 _dhcp 1 20 0 12M 484K select 1 0:00 0.00% = dhclient: awg0 (dhclient) >=20 > (Basically the Pine64+ 2GB [aarch64] above was idle after boot other th= an > some runs of top.) >=20 > I see this oddity across architectures, for example amd64, powerpc64, > aarch64, armv7. No wonder, it doesn't seem to have worked ever (?) as the compare_pid is simply not defined in compares list. Try attached patch. --------------A4141C8AEDD6A05DB767ECDD Content-Type: text/plain; charset=UTF-8; name="top.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="top.diff" ZGlmZiAtLWdpdCBhL3Vzci5iaW4vdG9wL21hY2hpbmUuYyBiL3Vzci5iaW4vdG9wL21hY2hp bmUuYwppbmRleCAzNzRjOWRhMGVkZjQuLmNkMTdmMmY1ZGMzYSAxMDA2NDQKLS0tIGEvdXNy LmJpbi90b3AvbWFjaGluZS5jCisrKyBiL3Vzci5iaW4vdG9wL21hY2hpbmUuYwpAQCAtMTUx MSw2ICsxNTExLDcgQEAgaW50ICgqY29tcGFyZXNbXSkoY29uc3Qgdm9pZCAqYXJnMSwgY29u c3Qgdm9pZCAqYXJnMikgPSB7CiAJY29tcGFyZV9pdmNzdywKIAljb21wYXJlX2ppZCwKIAlj b21wYXJlX3N3YXAsCisJY29tcGFyZV9waWQsCiAJTlVMTAogfTsKIAo= --------------A4141C8AEDD6A05DB767ECDD-- --K4MnkbIq1kvZZv22F6YB8GUEIr17WrPN7-- --OZCSiGraN9rwUmIzmMyxM4bI8TB3I95oQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE+Gq3PsPeLT4tL/9wk4vgf7Eq4WwFAlwhVIsACgkQk4vgf7Eq 4WwmDQgAtdcepgy+mA5JPPpBzaNL3bXkn9yZVhmBO6P5C86B15CNlddtPv2Yy0V5 WazMCsJ/5VBbaOc/0+SacqUZE61WHfZSBQgqq6MuX9X3Ul/NJ3dGSGqwpkJJZ6pn zAZR55/Z2vIi8c/ORjFF+e9ITi+2M6md5MSNUiARRgJli3TWs8wY6CE6OkrnSqmE z3+M+4PmMLn+Qa2kzJdgHkSgfJa8r5V94k3IyTHvkqeTdRVd02OY+38/MbIdoFAT G8g0OS5N1K+/c0IuX5I6dRgvYIwEm3RfY3Gglc+1GWVbwkT0GApSFlGdIaqIXQaR f6waSbdSTURzp7+XWks1BGyWgbMD5A== =pBXk -----END PGP SIGNATURE----- --OZCSiGraN9rwUmIzmMyxM4bI8TB3I95oQ--