linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
To: Jiri Slaby <jirislaby@kernel.org>, linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, kernel@collabora.com
Subject: Re: [PATCH 2/2] tty/sysrq: Add configurable handler to execute a compound action
Date: Mon, 17 Aug 2020 15:32:05 +0200	[thread overview]
Message-ID: <5fc8d6df-ff33-1afd-5a83-d79d41e0fefc@collabora.com> (raw)
In-Reply-To: <0280e30a-2e70-7d21-68a9-5a2c22d7f316@kernel.org>

Hi Jiri,

W dniu 12.08.2020 o 13:45, Jiri Slaby pisze:
> On 04. 08. 20, 18:24, Andrzej Pietrasiewicz wrote:
>> Userland might want to execute e.g. 'w' (show blocked tasks), followed
>> by 's' (sync), followed by 1000 ms delay and then followed by 'c' (crash)
>> upon a single magic SysRq. Or one might want to execute the famous "Raising
>> Elephants Is So Utterly Boring" action. This patch adds a configurable
>> handler, triggered with 'C', for this exact purpose. The user specifies the
>> composition of the compound action using syntax similar to getopt, where
>> each letter corresponds to an individual action and a colon followed by a
>> number corresponds to a delay of that many milliseconds, e.g.:
>>
>> ws:1000c
>>
>> or
>>
>> r:100eis:1000ub
> 
> I think I miss what's that good for, given I can do it one-by-one
> without setting such strings anywhere (I usually want to do different
> things on different kinds of crashes)?
> 

The "REISUB" action is a common way of handling a bad situation, though,
so having a shortcut for a common way is helpful, yet we are not forcing
this particular action to happen when the 'C' sysrq is invoked and offer
configurability instead.

I addressed the comments you had with regard to the code in a v2 series.

Regards,

Andrzej


  reply	other threads:[~2020-08-17 13:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04 16:24 [PATCH 0/2] Add configurable handler to execute a compound action Andrzej Pietrasiewicz
2020-08-04 16:24 ` [PATCH 1/2] tty/sysrq: Extend the sysrq_key_table to cover capital letters Andrzej Pietrasiewicz
2020-08-12 11:28   ` Jiri Slaby
2020-08-12 11:32   ` Jiri Slaby
2020-08-04 16:24 ` [PATCH 2/2] tty/sysrq: Add configurable handler to execute a compound action Andrzej Pietrasiewicz
2020-08-12 11:45   ` Jiri Slaby
2020-08-17 13:32     ` Andrzej Pietrasiewicz [this message]
2021-09-29 22:31   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5fc8d6df-ff33-1afd-5a83-d79d41e0fefc@collabora.com \
    --to=andrzej.p@collabora.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=kernel@collabora.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).