Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1311537

RE: [char-misc-next, v4, 5/7] watchdog: mei_wdt: register wd device only if required

From "Winkler, Tomas" <tomas.winkler@intel.com>
Newsgroups linux.kernel
Subject RE: [char-misc-next, v4, 5/7] watchdog: mei_wdt: register wd device only if required
Date 2016-01-18 14:20 +0100
Message-ID <qShSW-179-13@gated-at.bofh.it> (permalink)
References <qOrHb-6bs-3@gated-at.bofh.it> <qRZ9E-5nl-11@gated-at.bofh.it> <qS2Ay-7yv-9@gated-at.bofh.it> <qS3mW-87m-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



> only
> >> if required
> >>
> >> Hi Tomas,
> >>
> >> On Fri, Jan 08, 2016 at 12:49:25AM +0200, Winkler, Tomas wrote:
> >>> From: Alexander Usyskin <alexander.usyskin@intel.com>
> >>>
> >>> For Intel Broadwell and newer platforms, the ME device can inform
> >>> the host whether the watchdog functionality is activated or not.
> >>> If the watchdog functionality is not activated then the watchdog interface
> >>> can be not registered and eliminate unnecessary pings and hence lower the
> >>> power consumption by avoiding waking up the device.
> >>> The feature can be deactivated also without reboot
> >>> in that case the watchdog device should be unregistered at runtime.
> >>>
> >>> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
> >>> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> >>> ---
> >>> V2: rework unregistration
> >>> V3: rebase; implement unregistraion also at runtime
> >>> V4: Rebase the code over patchset : "watchdog: Replace driver based
> >> refcounting"
> >>>
> >>>   drivers/watchdog/mei_wdt.c | 196
> >> ++++++++++++++++++++++++++++++++++++++++++---
> >>>   1 file changed, 187 insertions(+), 9 deletions(-)
> >>>
> >>> diff --git a/drivers/watchdog/mei_wdt.c b/drivers/watchdog/mei_wdt.c
> >>> index e7e3f144f2b0..85b27fc5d4ec 100644
> >>> --- a/drivers/watchdog/mei_wdt.c
> >>> +++ b/drivers/watchdog/mei_wdt.c
> >>>
> >> [ ... ]
> >>
> >>> +static void mei_wdt_unregister_work(struct work_struct *work)
> >>> +{
> >>> +	struct mei_wdt *wdt = container_of(work, struct mei_wdt, unregister);
> >>> +
> >>> +	mei_wdt_unregister(wdt);
> >>> +}
> >>
> >> Registration is synchronous, unregistration is asynchronous.
> >>
> >> Assuming that is on purpose, I think it warrants an explanation.
> >>
> > The unregistration is detected on response from the  ping, which is run under
> same mutex as unregistration.
> > Tomas
> >
> >
> And that explains why registration can be synchronous and unregistration
> has to be asynchronous ?

You need to connect the dots but yes.
The registration is run from the internal ping request (in probe) or from an internal event (in runtime), so the flow is not already locked by the watchdog mutex. 
Hope it helps.
Tomas 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [char-misc-next, v4, 5/7] watchdog: mei_wdt: register wd device  only if required Guenter Roeck <linux@roeck-us.net> - 2016-01-17 18:20 +0100
  RE: [char-misc-next, v4, 5/7] watchdog: mei_wdt: register wd device  only if required "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-01-17 22:00 +0100
    Re: [char-misc-next, v4, 5/7] watchdog: mei_wdt: register wd device  only if required Guenter Roeck <linux@roeck-us.net> - 2016-01-17 22:50 +0100
      RE: [char-misc-next, v4, 5/7] watchdog: mei_wdt: register wd device  only if required "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-01-18 14:20 +0100
        Re: [char-misc-next, v4, 5/7] watchdog: mei_wdt: register wd device  only if required Guenter Roeck <linux@roeck-us.net> - 2016-01-18 16:50 +0100
          RE: [char-misc-next, v4, 5/7] watchdog: mei_wdt: register wd device  only if required "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-01-18 20:40 +0100
            Re: [char-misc-next, v4, 5/7] watchdog: mei_wdt: register wd device  only if required Guenter Roeck <linux@roeck-us.net> - 2016-01-18 21:30 +0100
              RE: [char-misc-next, v4, 5/7] watchdog: mei_wdt: register wd device  only if required "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-01-18 23:00 +0100

csiph-web