All of lore.kernel.org
 help / color / mirror / Atom feed
From: Taz <rastataz@gmail.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] Fancontrol memory consumption
Date: Sat, 28 Feb 2015 12:39:43 +0000	[thread overview]
Message-ID: <54F1B70F.5020308@gmail.com> (raw)
In-Reply-To: <20141105175729.39a88ab1@endymion.delvare>

Hi Jean,

Besides it looked strange, it didn't bother me enough so I stopped 
monitoring and kind of gave it up too...
But I'll certainly give the new patch a try (and restart monitoring), 
and give you feedback of course.

Thanks a lot !

     Taz (Cédric L.M.)


Le 28/02/2015 11:14, Jean Delvare a écrit :
> Hi Taz,
>
> On Thu, 13 Nov 2014 15:36:32 +0100, Taz wrote:
>> (sorry I just saw my reply still was in my drafts, don't know why...)
>>
>> Indeed : my current bash version is 4.3.11
>> Although I don't have line 585 in my fancontrol script
>> I can apply the the patch (lines 497 & 536 for fancontrol v0.7)
> The "patch" command can apply patch files with offsets just fine.
>
>> I also gave it a try without the wait lines and not sending to
>> background the previous
>> sleep command the wait was waiting for anyway (useless ?)
> Not sending sleep in the background reportedly caused delays or
> undesirable behavior on system suspend or shutdown on some systems. See:
> http://www.lm-sensors.org/changeset/4443/lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/fancontrol
>
>> => Mem consumption seems to be the same in all cases, we'll see in the
>> long run...
> I discussed the issue with the upstream bash maintainer, but he claims
> that the implementation is correct and required for Posix compliance.
> My own tests were confusing (sometimes I could reproduce the issue,
> sometimes not) so I couldn't reach a definitive conclusion, and
> ultimately I forgot about it / gave up on it.
>
> Meanwhile someone contributed a trick to the healthd script which may
> work just fine here too. It avoids both the call to an external command
> and the use of wait. Can you please revert the previous patch and give
> a try to this one instead?
>
> ---
>   prog/pwm/fancontrol |    6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
>
> --- lm-sensors.orig/prog/pwm/fancontrol	2014-11-17 09:16:14.657054963 +0100
> +++ lm-sensors/prog/pwm/fancontrol	2015-02-28 11:03:32.958562604 +0100
> @@ -545,8 +545,7 @@ function UpdateFanSpeeds
>   		  then # if fan was stopped start it using a safe value
>   		  	echo $minsa > $pwmo
>   			# Sleep while still handling signals
> -			sleep 1 &
> -			wait $!
> +			read -t 1 -N 0
>   		  fi
>   		fi
>   		echo $pwmval > $pwmo # write new value to pwm output
> @@ -584,6 +583,5 @@ while true
>   do
>   	UpdateFanSpeeds
>   	# Sleep while still handling signals
> -	sleep $INTERVAL &
> -	wait $!
> +	read -t $INTERVAL -N 0
>   done
>
> Thanks,


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  parent reply	other threads:[~2015-02-28 12:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05 16:57 [lm-sensors] Fancontrol memory consumption Jean Delvare
2014-11-07  9:15 ` Jean Delvare
2014-11-13 14:36 ` Taz
2015-02-28 10:14 ` Jean Delvare
2015-02-28 12:39 ` Taz [this message]
2015-02-28 13:13 ` Taz
2015-03-02  7:39 ` Jean Delvare
2015-03-02 10:30 ` Jean Delvare
2015-03-02 11:05 ` Taz
2015-03-02 12:26 ` Jean Delvare
2015-03-02 18:10 ` Taz
2015-06-01 13:32 ` Jean Delvare
2015-06-01 14:47 ` Jean Delvare
2015-06-13 18:17 ` Taz

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=54F1B70F.5020308@gmail.com \
    --to=rastataz@gmail.com \
    --cc=lm-sensors@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.