linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Cc: Wim Van Sebroeck <wim@iguana.be>,
	Guenter Roeck <linux@roeck-us.net>,
	Robin Gong <b38343@freescale.com>,
	linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/6] watchdog: add watchdog pretimeout framework
Date: Wed, 8 Jun 2016 08:54:45 +0200	[thread overview]
Message-ID: <20160608065445.GB1521@katana> (raw)
In-Reply-To: <1465321127-19522-5-git-send-email-vladimir_zapolskiy@mentor.com>

[-- Attachment #1: Type: text/plain, Size: 2108 bytes --]

On Tue, Jun 07, 2016 at 08:38:45PM +0300, Vladimir Zapolskiy wrote:
> The change adds a simple watchdog pretimeout framework infrastructure,
> its purpose is to allow users to select a desired handling of watchdog
> pretimeout events, which may be generated by some watchdog devices.
> 
> A user selects a default watchdog pretimeout governor during
> compilation stage.
> 
> Watchdogs with WDIOF_PRETIMEOUT capability now have two device
> attributes in sysfs: pretimeout to display currently set pretimeout
> value and pretimeout_governor attribute to display the selected
> watchdog pretimeout governor.
> 
> Watchdogs with no WDIOF_PRETIMEOUT capability has no changes in
> sysfs, and such watchdog devices do not require the framework.
> 
> Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
> ---
> Changes from v2 to v3:
> * essentially simplified the implementation due to removal of runtime
>   dynamic selection of watchdog pretimeout governors by a user, this
>   feature is supposed to be added later on

Hmm, your call, but I'm not sure this will make the reviewing process
easier...

> * removed support of sleepable watchdog pretimeout governors

This does.

> * moved sysfs device attributes to watchdog_dev.c, this required to
>   add exported watchdog_pretimeout_governor_name() interface

Why this move? Before, all the pretimeout stuff was nicely encapsulated
in its own file which could be compiled out. Now things are mixing. What
was wrong with the approach I took?`

> @@ -244,6 +245,13 @@ static int __watchdog_register_device(struct watchdog_device *wdd)
>  		}
>  	}
>  
> +	ret = watchdog_register_pretimeout(wdd);
> +	if (ret) {
> +		watchdog_dev_unregister(wdd);
> +		ida_simple_remove(&watchdog_ida, wdd->id);
> +		return ret;
> +	}
> +

What is the advantage of adding it here instead of adding it in
watchdog_dev.c? I mean the files to control govenors are tied to the
watchdog_device anyhow, so I'd think it's cleaner to move all that
action to watchdog_dev instead of having this stray one in the core.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-06-08  6:54 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07 17:38 [PATCH v3 0/6] watchdog: add watchdog pretimeout framework Vladimir Zapolskiy
2016-06-07 17:38 ` [PATCH v3 1/6] watchdog: add set_pretimeout interface Vladimir Zapolskiy
2016-06-07 20:32   ` Guenter Roeck
2016-06-08  6:34   ` Wolfram Sang
2016-06-08 12:58     ` Vladimir Zapolskiy
2016-06-09 21:12       ` Wolfram Sang
2016-06-07 17:38 ` [PATCH v3 2/6] watchdog: add WDIOC_SETPRETIMEOUT and WDIOC_GETPRETIMEOUT Vladimir Zapolskiy
2016-06-07 17:38 ` [PATCH v3 3/6] watchdog: add pretimeout read-only device attribute to sysfs Vladimir Zapolskiy
2016-06-08  6:57   ` Wolfram Sang
2016-06-07 17:38 ` [PATCH v3 4/6] watchdog: add watchdog pretimeout framework Vladimir Zapolskiy
2016-06-07 21:43   ` Guenter Roeck
2016-06-08 13:37     ` Vladimir Zapolskiy
2016-06-08 13:53       ` Guenter Roeck
2016-06-08 15:11         ` Vladimir Zapolskiy
2016-06-08 15:38           ` kbuild: default n removals? (was: Re: [PATCH v3 4/6] watchdog: add watchdog pretimeout framework) Joe Perches
2016-06-08 18:05             ` Guenter Roeck
2016-06-15 10:02             ` kbuild: default n removals? Michal Marek
2016-06-08  6:54   ` Wolfram Sang [this message]
2016-06-08 14:08     ` [PATCH v3 4/6] watchdog: add watchdog pretimeout framework Vladimir Zapolskiy
2016-06-08 18:20       ` Guenter Roeck
2016-06-09 21:22         ` Wolfram Sang
2016-06-09 21:14       ` Wolfram Sang
2016-06-07 17:38 ` [PATCH v3 5/6] watchdog: pretimeout: add panic pretimeout governor Vladimir Zapolskiy
2016-06-08  7:08   ` Wolfram Sang
2016-06-08 14:28     ` Vladimir Zapolskiy
2016-06-09 21:23       ` Wolfram Sang
2016-06-07 17:38 ` [PATCH v3 6/6] watchdog: pretimeout: add noop " Vladimir Zapolskiy
2016-06-08  7:10   ` Wolfram Sang
2016-06-08 14:32     ` Vladimir Zapolskiy
2016-06-08  7:56 ` [PATCH v3 0/6] watchdog: add watchdog pretimeout framework Wolfram Sang
2016-06-08 15:35   ` Vladimir Zapolskiy
2016-06-09 21:30     ` Wolfram Sang
2016-06-24  9:46 ` Wolfram Sang
2016-06-24 13:45   ` Guenter Roeck
2016-06-24 22:13     ` Vladimir Zapolskiy

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=20160608065445.GB1521@katana \
    --to=wsa@the-dreams.de \
    --cc=b38343@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=vladimir_zapolskiy@mentor.com \
    --cc=wim@iguana.be \
    /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).