From nobody Fri May 21 00:41:33 2021 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3AC856235F3 for ; Fri, 21 May 2021 00:41:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FmSV16rswz3h6d for ; Fri, 21 May 2021 00:41:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82a.google.com with SMTP id h24so2801191qtm.12 for ; Thu, 20 May 2021 17:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Y9GaogMdK8vvjbB9NNK95rlNPG0EyA/cDAmvV9BK3Bo=; b=yKJEvBL9on2badvATF0lYAr7Kaitl56Low5APZI3TgZ5IO1m6X0qPedxK/+rbsdSA/ irOMrHVYkGMRcZ/DXPoNI+CRpdEPwS9DLDewGcvOQ5utRwiagIkxhljEjSi7ly4rpTvK tANjuCzeGvOlOO4cr1YXemXVYi4sO5zV18kZ/YRiaTmrnPmC+wlQrIgWtTd+R/LulooZ pVbCJ1rCtPhymtfDL8REXoRhoS2nI0f+VmXp3p2sj1m2xvZpcL16epF1ImM9J0IGjZiA JCIediUZ3l5p5hVBgbcuZjp2v/rtr/NsGk3c93YQoTs3QOPcmz1NLlqs7IJkikFRJZLn Z6ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y9GaogMdK8vvjbB9NNK95rlNPG0EyA/cDAmvV9BK3Bo=; b=II67QLqB3A6fGKIVa/8TklYujIfuuQmZdQNFNFLZnjtwdreF3X1WaP9I4+ZbqPnhv/ uVOdYvMfU4lha0EsdZ3JqfTvA1I5d6Lfhk5DVP5z4c5sibAuWSCQ31nRb++xukbae7mP 43K8TVq2wlkYhnCVDfX6iOjRbfhGnCcbxhLAJiR4K+kFAiotbGYeUzGsR6xPYc41NrB8 ou4Y6csWTol27OFxnnj+Cnn8J1y9jT1ukHHJC+I/vv5PzWJHIZnxG4VRBkPh6YhusUL8 Svxld5VqLgH3Ia26NKBqCPMsr4zvg4MNr3+8zHRa5gjNo/Isaw/DE6cRZTfwbkMzXXY+ 3WCw== X-Gm-Message-State: AOAM532Gp/TbOUWB+qLJALIOXqRlTrtvYTTpk0wa7Kzr1HAlvBq13mWC b7qHKLqHhdAk7QKuau4UV7gQccIO9X9bQDhL2F+SrvX0plg= X-Google-Smtp-Source: ABdhPJwZT8KExlvP9YkXZ7yRgKJnQIhGvCyHsRL8U0g8J5DQlGomv3l2bsc0nFZ3qepzsOMcKqP9a/SQWeLuIdpTc4E= X-Received: by 2002:ac8:5986:: with SMTP id e6mr5956711qte.101.1621557705069; Thu, 20 May 2021 17:41:45 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Thu, 20 May 2021 18:41:33 -0600 Message-ID: Subject: Re: Reducing SIGINFO verbosity To: Michael Gmelin Cc: "Conrad E. Meyer" , FreeBSD Current Content-Type: multipart/alternative; boundary="000000000000fe72b905c2cc5230" X-Rspamd-Queue-Id: 4FmSV16rswz3h6d X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] --000000000000fe72b905c2cc5230 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 20, 2021, 6:28 PM Michael Gmelin wrote: > > > On 21. May 2021, at 01:00, Conrad Meyer wrote: > > =EF=BB=BF > No, I don=E2=80=99t think there=E2=80=99s any reason to default it differ= ently on stable > vs current. I think it=E2=80=99s useful (and I prefer the more verbose fo= rm, which > isn=E2=80=99t the default). > > Conrad > > > Well, to me siginfo is part of the user interface and changing the user > interface to show lots of debug information by default feels wrong > (especially on a 80x25 terminal, where it now takes multiple lines). A > typical example is hitting ctrl-t a couple of times to see the progress i= n > a long running dd operation, all the extra clutter makes this unnecessari= ly > inconvenient. Maybe your use case differs, I don=E2=80=99t need to see sy= stem call > details when checking the poudriere build status. > > In the end, personally this simply means that there is one more thing I > have to configure on every host in the future, I don=E2=80=99t really hav= e the > energy to fight over this. > > It would be nice if changing defaults of things that were the same for > decades would be mentioned somewhere in the release notes though. Or mayb= e > in the verbose output itself? Just an idea, how this could be done in a > user friendly way: > > Right now we have > 0 - normal > 1 - verbose > 2 - very verbose > > What about adding a bit here that controls an extra line saying: > > "You can control the verbosity of siginfo output with sysctl > kern.tty_info_kstacks" > > Therefore, we would have these additional values, one of them being the > default value: > > 16 - normal + sysctl help message > 17 - verbose + sysctl help message > 18 - very verbose + sysctl message > > At this point the default won=E2=80=99t matter that much, as users learn = about the > feature after the update and can easily configure the setting that suits > their needs. > > Just trying to be somehow constructive here, having this on by default > still doesn=E2=80=99t feel right to me. > If this were a tunable, I think cem's default is good. We'll be able to get more data than otherwise. Since the sysctl is writable, people can mostly get the extra info by logging in elsewhere and setting it. Part of me wants to have a toggle. Hit it 3 times in a second and we'd toggle verbosity. But then we'd want to turn it off for security, so I'm not so sure the complexity is worth it.. Warner Michael > > > On Thu, May 20, 2021 at 11:59 John-Mark Gurney wrote: > >> Michael Gmelin wrote this message on Thu, May 20, 2021 at 18:01 +0200: >> > I'm leaving this here, mostly so that others (or future me) can google >> > it up. >> > >> > Traditionally, CTRL-t would give a one-line output + whatever the >> > process specific signal handler comes up with: >> > >> > # sleep 120 <--- hits CTRL-t >> > load: 0.27 cmd: sleep 38162 [nanslp] 0.64r 0.00u 0.00s 0% 1780k >> > sleep: about 119 second(s) left out of the original 120 >> > >> > # cat <--- hits CTRL-t >> > load: 0.02 cmd: cat 24379 [ttyin] 0.63r 0.00u 0.00s 0% 2308k >> > >> > >> > On 13 I get: >> > >> > # sleep 120 <--- hits CTRL-t >> > load: 0.12 cmd: sleep 3241 [nanslp] 0.52r 0.00u 0.00s 0% 2172k >> > mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_timedwait_sig+0x12 >> > _sleep+0x199 kern_clock_nanosleep+0x1e1 sys_nanosleep+0x3b >> > amd64_syscall+0x10c fast_syscall_common+0xf8 sleep: about 119 >> > second(s) left out of the original 120 >> > >> > # cat <--- hits CTRL-t >> > load: 0.09 cmd: cat 3240 [ttyin] 0.23r 0.00u 0.00s 0% 2300k >> > mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_wait_sig+0x9 >> > _cv_wait_sig+0xe4 tty_wait+0x1c ttydisc_read+0x2ac ttydev_read+0x56 >> > devfs_read_f+0xd5 dofileread+0x81 sys_read+0xbc amd64_syscall+0x10c >> > fast_syscall_common+0xf8 >> > >> > which is quite way too verbose when checking the progress of >> > long-running processes, like cp, dd, or poudriere. Especially as CTRL-= t >> > is part of the user experience to me - I use it to interact with the >> > machine outside of debugging software issues. >> > >> > Setting >> > >> > sysctl kern.tty_info_kstacks=3D0 >> > echo kern.tty_info_kstacks=3D0 >>/etc/sysctl.conf >> > >> > fixes this permanently. >> > >> > Apparently, this was enabled by default on purpose[0], so that people >> > find the feature (which certainly worked ^_^), but I think it would >> > been worth mentioning the sysctl somewhere in the release notes/errata= , >> > so that people understand how to disable it again. >> >> I think the original intent was to disable this on -stable or at least >> -RELEASEs, but it looks like this didn't happen. This is VERY helpful >> for a developer, but not as helpful for most users. >> >> Conrad, >> >> Should this be disabled on -stable now? >> >> -- >> John-Mark Gurney Voice: +1 415 225 5579 >> >> "All that I will do, has been done, All that I have, has not." >> > --000000000000fe72b905c2cc5230 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, May 20, 2021, 6:28 PM Michael Gmelin <freebsd@grem.de> wrote:


On 21. May 2021= , at 01:00, Conrad Meyer <cem@freebsd.org> wrote:

=EF=BB=BF
No, I don=E2=80=99t think there=E2=80=99s any reason to default it diffe= rently on stable vs current. I think it=E2=80=99s useful (and I prefer the = more verbose form, which isn=E2=80=99t the default).

Conrad=C2=A0

=
Well, to me siginfo is part of the user interface and changing t= he user interface to show lots of debug information by default feels wrong = (especially on a 80x25 terminal, where it now takes multiple lines). A typi= cal example is hitting ctrl-t a couple of times to see the progress in a lo= ng running dd operation, all the extra clutter makes this unnecessarily inc= onvenient. Maybe your use case differs, I don=E2=80=99t need to see system = call details when checking the poudriere build status.

=
In the end, personally this simply means that there is one more thing = I have to configure on every host in the future, I don=E2=80=99t really hav= e the energy to fight over this.

It would be nice = if changing defaults of things that were the same for decades would be ment= ioned somewhere in the release notes though. Or maybe in the verbose output= itself? Just an idea, how this could be done in a user friendly way:
=

Right now we have=C2=A0
0 - normal
= 1 - verbose
2 - very verbose

What about = adding a bit here that controls an extra line saying:

<= div>"You can control the verbosity of siginfo output with sysctl kern.= tty_info_kstacks"

Therefore, we would have th= ese additional values, one of them being the default value:

<= /div>
16 - normal + sysctl help message
17 - verbose + sysctl= help message
18 - very verbose + sysctl message

At this point the default won=E2=80=99t matter that much, as users= learn about the feature after the update and can easily configure the sett= ing that suits their needs.

Just trying to be some= how constructive here, having this on by default still doesn=E2=80=99t feel= right to me.
<= br>
If this were a tunable, I think cem's defaul= t is good. We'll be able to get more data than otherwise. Since the sys= ctl is writable, people can mostly get the extra info by logging in elsewhe= re and setting it.

Part = of me wants to have a toggle. Hit it 3 times in a second and we'd toggl= e verbosity. But then we'd want to turn it off for security, so I'm= not so sure the complexity is worth it..

=
Warner=C2=A0


Michael


On Thu, May 20, 2021= at 11:59 John-Mark Gurney <jmg@funkthat.com> wrote:
Michael Gmelin wrote this message on Thu, May 2= 0, 2021 at 18:01 +0200:
> I'm leaving this here, mostly so that others (or future me) can go= ogle
> it up.
>
> Traditionally, CTRL-t would give a one-line output + whatever the
> process specific signal handler comes up with:
>
>=C2=A0 =C2=A0# sleep 120 <--- hits CTRL-t
>=C2=A0 =C2=A0load: 0.27=C2=A0 cmd: sleep 38162 [nanslp] 0.64r 0.00u 0.0= 0s 0% 1780k
>=C2=A0 =C2=A0sleep: about 119 second(s) left out of the original 120 >
>=C2=A0 =C2=A0# cat <--- hits CTRL-t
>=C2=A0 =C2=A0load: 0.02=C2=A0 cmd: cat 24379 [ttyin] 0.63r 0.00u 0.00s = 0% 2308k
>
>=C2=A0 =C2=A0
> On 13 I get:
>
>=C2=A0 =C2=A0# sleep 120 <--- hits CTRL-t
>=C2=A0 =C2=A0load: 0.12=C2=A0 cmd: sleep 3241 [nanslp] 0.52r 0.00u 0.00= s 0% 2172k
>=C2=A0 =C2=A0mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_timedwait= _sig+0x12
>=C2=A0 =C2=A0_sleep+0x199 kern_clock_nanosleep+0x1e1 sys_nanosleep+0x3b=
>=C2=A0 =C2=A0amd64_syscall+0x10c fast_syscall_common+0xf8 sleep: about = 119
>=C2=A0 =C2=A0second(s) left out of the original 120
>
>=C2=A0 =C2=A0# cat <--- hits CTRL-t
>=C2=A0 =C2=A0load: 0.09=C2=A0 cmd: cat 3240 [ttyin] 0.23r 0.00u 0.00s 0= % 2300k
>=C2=A0 =C2=A0mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_wait_sig+= 0x9
>=C2=A0 =C2=A0_cv_wait_sig+0xe4 tty_wait+0x1c ttydisc_read+0x2ac ttydev_= read+0x56
>=C2=A0 =C2=A0devfs_read_f+0xd5 dofileread+0x81 sys_read+0xbc amd64_sysc= all+0x10c
>=C2=A0 =C2=A0fast_syscall_common+0xf8
>
> which is quite way too verbose when checking the progress of
> long-running processes, like cp, dd, or poudriere. Especially as CTRL-= t
> is part of the user experience to me - I use it to interact with the > machine outside of debugging software issues.
>
> Setting
>
>=C2=A0 =C2=A0sysctl kern.tty_info_kstacks=3D0
>=C2=A0 =C2=A0echo kern.tty_info_kstacks=3D0 >>/etc/sysctl.conf >
> fixes this permanently.
>
> Apparently, this was enabled by default on purpose[0], so that people<= br> > find the feature (which certainly worked ^_^), but I think it would > been worth mentioning the sysctl somewhere in the release notes/errata= ,
> so that people understand how to disable it again.

I think the original intent was to disable this on -stable or at least
-RELEASEs, but it looks like this didn't happen.=C2=A0 This is VERY hel= pful
for a developer, but not as helpful for most users.

Conrad,

Should this be disabled on -stable now?

--
=C2=A0 John-Mark Gurney=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Voice: +1 415 225 5579=

=C2=A0 =C2=A0 =C2=A0"All that I will do, has been done, All that I hav= e, has not."
--000000000000fe72b905c2cc5230--