aboutsummaryrefslogtreecommitdiff
path: root/drivers/leds/trigger/ledtrig-activity.c
AgeCommit message (Collapse)AuthorFilesLines
2019-11-21leds: Use all-in-one vtime aware kcpustat accessorFrederic Weisbecker1-5/+9
We can now safely read user kcpustat fields on nohz_full CPUs. Use the appropriate accessor. [ mingo: Fixed build failure. ] Reported-by: Yauheni Kaliuta <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Jacek Anaszewski <[email protected]> (maintainer:LED SUBSYSTEM) Cc: Pavel Machek <[email protected]> (maintainer:LED SUBSYSTEM) Cc: Dan Murphy <[email protected]> (reviewer:LED SUBSYSTEM) Cc: Peter Zijlstra <[email protected]> Cc: Wanpeng Li <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2019-10-29leds: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEMFrederic Weisbecker1-1/+1
Now that we have a vtime safe kcpustat accessor for CPUTIME_SYSTEM, use it to start fixing frozen kcpustat values on nohz_full CPUs. Reported-by: Yauheni Kaliuta <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Jacek Anaszewski <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rafael J . Wysocki <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Viresh Kumar <[email protected]> Cc: Wanpeng Li <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2019-07-03Merge branch 'timers/vdso' into timers/coreThomas Gleixner1-4/+1
so the hyper-v clocksource update can be applied.
2019-06-22timekeeping: Use proper clock specifier names in functionsJason A. Donenfeld1-1/+1
This makes boot uniformly boottime and tai uniformly clocktai, to address the remaining oversights. Signed-off-by: Jason A. Donenfeld <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-4/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Enrico Weigelt <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-07-05leds: activity trigger: simplifications from core changesUwe Kleine-König1-22/+16
The trigger core learned error handling for the activate callback and can handle device attributes now. This allows simplifying the driver considerably. Note that .deactivate() is only called when .activate() succeeded, so the check for .activated can go away in .deactivate(). Also make use of module_led_trigger() and the accessor function to get and set trigger_data. Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Jacek Anaszewski <[email protected]>
2018-07-05leds: triggers: let struct led_trigger::activate() return an error codeUwe Kleine-König1-3/+5
Given that activating a trigger can fail, let the callback return an indication. This prevents to have a trigger active according to the "trigger" sysfs attribute but not functional. All users are changed accordingly to return 0 for now. There is no intended change in behaviour. Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Jacek Anaszewski <[email protected]>
2018-07-05leds: triggers: make the MODULE_LICENSE string match the actual licenseUwe Kleine-König1-2/+2
These files are licensed under GPL version 2 only. So use "GPL v2" instead of "GPL" (which means v2 or later). Also remove an empty (but commented) line at the end of the license header which nicely proves in the context that the drivers are really v2 only :-) Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Jacek Anaszewski <[email protected]>
2018-06-19leds: ledtrig-activity: use ktime_get_boot_ns()Arnd Bergmann1-4/+1
get_monotonic_boottime() is deprecated, so let's convert this to the simpler ktime_get_boot_ns(). Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Jacek Anaszewski <[email protected]>
2017-10-25leds: Convert timers to use timer_setup()Kees Cook1-6/+8
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Richard Purdie <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Willy Tarreau <[email protected]> Cc: [email protected] Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Jacek Anaszewski <[email protected]>
2017-10-06leds: ledtrig-activity: Add a system activity LED triggerWilly Tarreau1-0/+273
The "activity" trigger was inspired by the heartbeat one, but aims at providing instant indication of the immediate CPU usage. Under idle condition, it flashes 10ms every second. At 100% usage, it flashes 90ms every 100ms. The blinking frequency increases from 1 to 10 Hz until either the load is high enough to saturate one CPU core or 50% load is reached on a single-core system. Then past this point only the duty cycle increases from 10 to 90%. This results in a very visible activity reporting allowing one to immediately tell whether a machine is under load or not, making it quite suitable to be used in clusters. Signed-off-by: Willy Tarreau <[email protected]> Signed-off-by: Jacek Anaszewski <[email protected]>