public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Magnus Damm <magnus.damm@gmail.com>
Subject: Re: [patch 07/15] clocksource: Provide unbind interface in sysfs
Date: Wed, 15 May 2013 09:53:25 -0700	[thread overview]
Message-ID: <5193BD85.8030803@linaro.org> (raw)
In-Reply-To: <alpine.LFD.2.02.1305151144550.1388@ionos>

On 05/15/2013 02:47 AM, Thomas Gleixner wrote:
> On Mon, 29 Apr 2013, John Stultz wrote:
>> On 04/25/2013 01:31 PM, Thomas Gleixner wrote:
>>> With the module refcount held for the current clocksource there is no
>>> way to unload the module.
>>>
>>> Provide a sysfs interface which allows to unbind the clocksource. One
>>> could argue that the clocksource override could be (ab)used to do so,
>>> but the clocksource override cannot be used from the kernel itself,
>>> while an unbind function can be used to programmatically check whether
>>> a clocksource can be shutdown or not.
>>>
>>> The unbind functionality uses the new skip current feature of
>>> clocksource_select and verifies that a fallback clocksource has been
>>> installed. If the clocksource which should be unbound is the current
>>> clocksource and no fallback can be found, unbind returns -EBUSY.
>>>
>>> This does not support the unbinding of a clocksource which is used as
>>> the watchdog clocksource. No point in fostering crappy hardware.
>> So.. if the clocksource you want to unbind is the highest rated continuous
>> clocksource that doesn't need a watchdog (basically what's likely to be in-use
>> and required to be unbinded), its likely to be selected as the watchdog
>> already.
>>
>> ie: on a system that has only HPET/ACPI_PM, you can't unbind HPET, since its a
>> watchdog.
> No. The thing is that I only prevent unbinding if it is used as the
> watchdog. In the above HPET/PM scenario both are potential watchdogs,
> but w/o a user it's valid to unbind one of them.
>
> What I need to prevent is:
>
> TSC is current clocksource and we only have ACPI_PM as watchdog and
> its used. So now you try to unbind ACPI_PM then the TSC would be left
> w/o a watchdog instance. That's what I'm preventing. Will reword the
> changelog accordingly.

You might double check the logic, because I feel like I actually hit 
this issue where on my vm machine w/ only hpet/acpi_pm I couldn't unbind 
the hpet.

Though its been a few weeks, so maybe I'm confusing things?
Let me know if you want me to try to reproduce it.

thanks
-john


  reply	other threads:[~2013-05-15 16:53 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-25 20:31 [patch 00/15] clocksource/events: Overhaul (un)registration Thomas Gleixner
2013-04-25 20:31 ` [patch 01/15] clocksource: apb_timer: Remove unsused function Thomas Gleixner
2013-04-26 12:43   ` Jamie Iles
2013-04-30  0:32   ` John Stultz
2013-05-27  9:41   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-04-25 20:31 ` [patch 02/15] clocksource: Always verify highres capability Thomas Gleixner
2013-04-30  0:34   ` John Stultz
2013-05-27  9:42   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-04-25 20:31 ` [patch 03/15] clocksource: Let timekeeping_notify return success/error Thomas Gleixner
2013-04-30  0:37   ` John Stultz
2013-05-27  9:43   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-04-25 20:31 ` [patch 04/15] clocksource: Add module refcount Thomas Gleixner
2013-04-30  0:51   ` John Stultz
2013-05-27  9:45   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-04-25 20:31 ` [patch 06/15] clocksource: Split out user string input Thomas Gleixner
2013-04-29 23:29   ` John Stultz
2013-05-15  9:41     ` Thomas Gleixner
2013-05-27  9:47   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-04-25 20:31 ` [patch 05/15] clocksource: Allow clocksource select to skip current clocksource Thomas Gleixner
2013-04-30  1:00   ` John Stultz
2013-05-15  9:42     ` Thomas Gleixner
2013-05-27  9:46   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-04-25 20:31 ` [patch 07/15] clocksource: Provide unbind interface in sysfs Thomas Gleixner
2013-04-30  1:11   ` John Stultz
2013-05-15  9:47     ` Thomas Gleixner
2013-05-15 16:53       ` John Stultz [this message]
2013-05-15 18:41         ` Thomas Gleixner
2013-05-27  9:48   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-04-25 20:31 ` [patch 08/15] clocksource: Let clocksource_unregister() return success/error Thomas Gleixner
2013-04-30  1:01   ` John Stultz
2013-05-27  9:50   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-04-25 20:31 ` [patch 09/15] clockevents: Get rid of the notifier chain Thomas Gleixner
2013-05-27  9:51   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-04-25 20:31 ` [patch 10/15] clockevents: Simplify locking Thomas Gleixner
2013-05-27  9:52   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-04-25 20:31 ` [patch 11/15] clockevents: Move the tick_notify() switch case to clockevents_notify() Thomas Gleixner
2013-05-27  9:54   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-04-25 20:31 ` [patch 13/15] clockevents: Provide sysfs interface Thomas Gleixner
2013-04-26 22:37   ` Stephen Boyd
2013-05-15  9:50     ` Thomas Gleixner
2013-05-15 22:30       ` Stephen Boyd
2013-05-27  9:56   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-04-25 20:31 ` [patch 12/15] clockevents: Add module refcount Thomas Gleixner
2013-05-27  9:55   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-04-25 20:31 ` [patch 14/15] clockevents: Split out selection logic Thomas Gleixner
2013-05-27  9:57   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-04-25 20:31 ` [patch 15/15] clockevents: Implement unbind functionality Thomas Gleixner
2013-05-27  9:59   ` [tip:timers/core] " tip-bot for Thomas Gleixner

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=5193BD85.8030803@linaro.org \
    --to=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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