Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1484739
| From | Jacek Anaszewski <j.anaszewski@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [ISSUE] Memleak in LED sysfs on heavy usage |
| Date | 2016-09-16 09:40 +0200 |
| Message-ID | <shVUB-1AV-5@gated-at.bofh.it> (permalink) |
| References | <sgQaC-72V-11@gated-at.bofh.it> <sgvfQ-VS-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Daniel,
On 09/12/2016 10:50 AM, Daniel Gorsulowski wrote:
> Hello!
>
> Please consider if I made something wrong, sending this issue. This is
> my first contact to the LKML.
> By mistake, I accessed an LED via /sys/class/leds subsystem very fast in
> an user application. I figured out, that the free user memory decreased
> constantly. So I tried to analyze the Problem and wrote a litte script:
>
> #!/bin/sh
> while [ 1 ]; do
> echo 1 > /sys/class/leds/2a_service_yellow/brightness
> echo 0 > /sys/class/leds/2a_service_yellow/brightness
> done
>
> And voila, I was able to reproduce the problem.
> So I add a bit more debugging:
>
> #!/bin/sh
> cnt=0
> while [ 1 ]; do
> if [ `expr $cnt % 1000` -eq 0 ]; then
> free | grep Mem: | cut -d' ' -f25
> fi
> echo 1 > /sys/class/leds/2a_service_yellow/brightness
> echo 0 > /sys/class/leds/2a_service_yellow/brightness
> let "cnt++"
> done
>
> And huh? No memory is eaten anymore. So it looks like, the problem only
> occours on heavy (fast) usage of /sys/class/leds subsystem.
>
> I rewrote the script and toggled a GPIO pin, but there was no problem
> recognizable.
I've been unable to reproduce the problem with leds-aat1290 driver
and Samsung M0 board. It must be driver specific issue.
What driver did you use?
>
> Some details about my test environment:
> Hardware: Ti Sitara AM3357ZCZ with 128MiB memory
> Kernel: vanilla 4.6
>
> The relevant part of my .dts:
> #include "am33xx.dtsi"
>
> / {
> ...
> cpus {
> cpu@0 {
> cpu0-supply = <&dcdc2_reg>;
> operating-points = <
> /* kHz uV */
> 800000 1300000
> 600000 1112000
> 300000 969000
> >;
> };
> };
>
> memory {
> device_type = "memory";
> reg = <0x80000000 0x08000000>; /* 128 Mib */
> };
> ...
>
> leds {
> pinctrl-names = "default";
> pinctrl-0 = <&user_leds_s0>;
>
> compatible = "gpio-leds";
>
> ...
> led2 {
> label = "2a_service_yellow";
> gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
> linux,default-trigger = "2a_service_yellow";
> default-state = "off";
> };
>
> ...
> };
> ...
> };
>
> &am33xx_pinmux {
> pinctrl-names = "default";
> pinctrl-0 = <&gpio_misc_pins>;
>
> ...
> user_leds_s0: user_leds_s0 {
> pinctrl-single,pins = <
> ...
> 0x24 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (T10)
> gpmc_ad9.gpio0[23] */
> >;
> };
> ...
> };
> ...
>
> Kind regards
> Daniel
> --
> To unsubscribe from this list: send the line "unsubscribe linux-leds" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
--
Best regards,
Jacek Anaszewski
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[ISSUE] Memleak in LED sysfs on heavy usage Daniel Gorsulowski <daniel.gorsulowski@esd.eu> - 2016-09-12 11:00 +0200
Re: [ISSUE] Memleak in LED sysfs on heavy usage Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-09-13 09:20 +0200
Re: [ISSUE] Memleak in LED sysfs on heavy usage Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-09-16 09:40 +0200
Re: [ISSUE] Memleak in LED sysfs on heavy usage Daniel Gorsulowski <daniel.gorsulowski@esd.eu> - 2016-09-16 10:20 +0200
Re: [ISSUE] Memleak in LED sysfs on heavy usage Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-09-16 13:30 +0200
Re: [ISSUE] Memleak in LED sysfs on heavy usage Daniel Gorsulowski <daniel.gorsulowski@esd.eu> - 2016-09-16 14:10 +0200
Re: [ISSUE] Memleak in LED sysfs on heavy usage Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-09-16 15:50 +0200
Re: [ISSUE] Memleak in LED sysfs on heavy usage Greg KH <greg@kroah.com> - 2016-09-16 16:10 +0200
Re: [ISSUE] Memleak in LED sysfs on heavy usage Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-09-16 16:40 +0200
Re: [ISSUE] Memleak in LED sysfs on heavy usage Greg KH <greg@kroah.com> - 2016-09-16 16:50 +0200
Re: [ISSUE] Memleak in LED sysfs on heavy usage Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2016-09-16 21:00 +0200
Re: [ISSUE] Memleak in LED sysfs on heavy usage Greg KH <greg@kroah.com> - 2016-09-16 21:50 +0200
Re: [ISSUE] Memleak in LED sysfs on heavy usage Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2016-09-16 23:10 +0200
Re: [ISSUE] Memleak in LED sysfs on heavy usage Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-09-19 10:40 +0200
Re: [ISSUE] Memleak in LED sysfs on heavy usage Daniel Gorsulowski <daniel.gorsulowski@esd.eu> - 2016-09-19 06:40 +0200
csiph-web