unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* accumulated timers which machine is in suspend-to-ram
@ 2019-04-20  3:38 Stefan Monnier
  2019-04-21 22:04 ` Michael Heerdegen
  0 siblings, 1 reply; 21+ messages in thread
From: Stefan Monnier @ 2019-04-20  3:38 UTC (permalink / raw)
  To: emacs-devel

Has anything changed in the treatment of timers?
I noticed in the last few weeks that when my machines wake up from
suspend-to-ram, my Emacsen tend to be busy for a while, and apparently
they're busy running savehist-save over and over again.

Does that ring a bell for someone?


        Stefan



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-20  3:38 accumulated timers which machine is in suspend-to-ram Stefan Monnier
@ 2019-04-21 22:04 ` Michael Heerdegen
  2019-04-22  6:41   ` Eli Zaretskii
  0 siblings, 1 reply; 21+ messages in thread
From: Michael Heerdegen @ 2019-04-21 22:04 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> Has anything changed in the treatment of timers?
> I noticed in the last few weeks that when my machines wake up from
> suspend-to-ram, my Emacsen tend to be busy for a while, and apparently
> they're busy running savehist-save over and over again.

I see the same since some weeks.  I hope we can find a cause, it's
annoying.

Michael.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-21 22:04 ` Michael Heerdegen
@ 2019-04-22  6:41   ` Eli Zaretskii
  2019-04-22 18:12     ` Michael Heerdegen
  0 siblings, 1 reply; 21+ messages in thread
From: Eli Zaretskii @ 2019-04-22  6:41 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: monnier, emacs-devel

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Date: Mon, 22 Apr 2019 00:04:32 +0200
> Cc: emacs-devel@gnu.org
> 
> Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
> 
> > Has anything changed in the treatment of timers?
> > I noticed in the last few weeks that when my machines wake up from
> > suspend-to-ram, my Emacsen tend to be busy for a while, and apparently
> > they're busy running savehist-save over and over again.
> 
> I see the same since some weeks.

"The same" meaning that in your case it's also savehist-save that runs
repeatedly?



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-22  6:41   ` Eli Zaretskii
@ 2019-04-22 18:12     ` Michael Heerdegen
  2019-04-22 18:22       ` Eli Zaretskii
  0 siblings, 1 reply; 21+ messages in thread
From: Michael Heerdegen @ 2019-04-22 18:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: monnier, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> "The same" meaning that in your case it's also savehist-save that runs
> repeatedly?

I think so, yes.  I profiled the situation multiple times.
`savehist-save' always had an amount of ~ 60%, also garbage collection
had a large amount.  What I can't say is whether `savehist-save' had
been called repeatedly or if the calls only took extremely long.  I'll
try to use the tracer to check that.

Michael.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-22 18:12     ` Michael Heerdegen
@ 2019-04-22 18:22       ` Eli Zaretskii
  2019-04-23 17:06         ` Stefan Monnier
  2019-04-23 20:41         ` Michael Heerdegen
  0 siblings, 2 replies; 21+ messages in thread
From: Eli Zaretskii @ 2019-04-22 18:22 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: monnier, emacs-devel

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: monnier@IRO.UMontreal.CA,  emacs-devel@gnu.org
> Date: Mon, 22 Apr 2019 20:12:17 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > "The same" meaning that in your case it's also savehist-save that runs
> > repeatedly?
> 
> I think so, yes.  I profiled the situation multiple times.
> `savehist-save' always had an amount of ~ 60%, also garbage collection
> had a large amount.  What I can't say is whether `savehist-save' had
> been called repeatedly or if the calls only took extremely long.  I'll
> try to use the tracer to check that.

Thanks.

Hmm... if by "few weeks" Stefan meant something that could have
started in February, then maybe it's 476066e8?  Or 988e37f?



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-22 18:22       ` Eli Zaretskii
@ 2019-04-23 17:06         ` Stefan Monnier
  2019-04-23 20:41         ` Michael Heerdegen
  1 sibling, 0 replies; 21+ messages in thread
From: Stefan Monnier @ 2019-04-23 17:06 UTC (permalink / raw)
  To: emacs-devel

> Hmm... if by "few weeks" Stefan meant something that could have
> started in February, then maybe it's 476066e8?  Or 988e37f?

I just saw that Emacs-26.1 also tries to catch up with the N missed
repetitions of timers when we wake up, so the new problem (for which
I haven't yet filed a bug report) is not only due to this behavior (for
which I just filed a bug report).


        Stefan




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-22 18:22       ` Eli Zaretskii
  2019-04-23 17:06         ` Stefan Monnier
@ 2019-04-23 20:41         ` Michael Heerdegen
  2019-04-24  6:54           ` Eli Zaretskii
  1 sibling, 1 reply; 21+ messages in thread
From: Michael Heerdegen @ 2019-04-23 20:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: monnier, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> Hmm... if by "few weeks" Stefan meant something that could have
> started in February, then maybe it's 476066e8?  Or 988e37f?

I've rebuild Emacs with yesterdays master (4bf3c94939) and 476066e8
reverted (apart from some small conflicting parts).  The business after
wake up from suspend to ram was gone.  So unless the issue had been
fixed yesterday 476066e8 seems to be related.

Michael.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-23 20:41         ` Michael Heerdegen
@ 2019-04-24  6:54           ` Eli Zaretskii
  2019-04-24  7:21             ` Michael Heerdegen
  2019-04-24 12:52             ` Stefan Monnier
  0 siblings, 2 replies; 21+ messages in thread
From: Eli Zaretskii @ 2019-04-24  6:54 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: monnier, emacs-devel

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Date: Tue, 23 Apr 2019 22:41:58 +0200
> Cc: monnier@IRO.UMontreal.CA, emacs-devel@gnu.org
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Hmm... if by "few weeks" Stefan meant something that could have
> > started in February, then maybe it's 476066e8?  Or 988e37f?
> 
> I've rebuild Emacs with yesterdays master (4bf3c94939) and 476066e8
> reverted (apart from some small conflicting parts).  The business after
> wake up from suspend to ram was gone.  So unless the issue had been
> fixed yesterday 476066e8 seems to be related.

That's strange, because if you have the same problem as Stefan, I
think this is veteran functionality, see my response in bug#35400.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-24  6:54           ` Eli Zaretskii
@ 2019-04-24  7:21             ` Michael Heerdegen
  2019-04-24  7:29               ` Eli Zaretskii
  2019-04-24 12:52             ` Stefan Monnier
  1 sibling, 1 reply; 21+ messages in thread
From: Michael Heerdegen @ 2019-04-24  7:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: monnier, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> That's strange, because if you have the same problem as Stefan, I
> think this is veteran functionality, see my response in bug#35400.

Yes, strange indeed.  But I'm very sure that the original issue (Emacs
busy for quite a long time after wake up) is new.  The latest commits
somehow changed the behavior, so the reason is probably not as trivial
as the bug report suggests.  Maybe the 10 is not honored anymore because
of the integer conversions?  Or something like that?

Michael.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-24  7:21             ` Michael Heerdegen
@ 2019-04-24  7:29               ` Eli Zaretskii
  2019-04-24  7:38                 ` Michael Heerdegen
  0 siblings, 1 reply; 21+ messages in thread
From: Eli Zaretskii @ 2019-04-24  7:29 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: monnier, emacs-devel

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: monnier@IRO.UMontreal.CA,  emacs-devel@gnu.org
> Date: Wed, 24 Apr 2019 09:21:12 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > That's strange, because if you have the same problem as Stefan, I
> > think this is veteran functionality, see my response in bug#35400.
> 
> Yes, strange indeed.  But I'm very sure that the original issue (Emacs
> busy for quite a long time after wake up) is new.

So you are unable to reproduce in Emacs 26?

> The latest commits somehow changed the behavior, so the reason is
> probably not as trivial as the bug report suggests.  Maybe the 10 is
> not honored anymore because of the integer conversions?  Or
> something like that?

Do you see more than 10 repetitions of the same timer?  Does the
variable control how many repetitions you see?



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-24  7:29               ` Eli Zaretskii
@ 2019-04-24  7:38                 ` Michael Heerdegen
  2019-04-25  0:10                   ` Michael Heerdegen
  0 siblings, 1 reply; 21+ messages in thread
From: Michael Heerdegen @ 2019-04-24  7:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: monnier, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> So you are unable to reproduce in Emacs 26?

I was unable to reproduce with 476066e8 reverted, at least.  I can check
with Emacs 26 again.

> > The latest commits somehow changed the behavior, so the reason is
> > probably not as trivial as the bug report suggests.  Maybe the 10 is
> > not honored anymore because of the integer conversions?  Or
> > something like that?
>
> Do you see more than 10 repetitions of the same timer?  Does the
> variable control how many repetitions you see?

For now I'm tracing 'savehist-autosave'.  I get an entry every 5
minutes.  Let's see how many entries I get when Emacs wakes up from Ram
next time.


Michael.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-24  6:54           ` Eli Zaretskii
  2019-04-24  7:21             ` Michael Heerdegen
@ 2019-04-24 12:52             ` Stefan Monnier
  2019-04-24 13:17               ` Eli Zaretskii
  1 sibling, 1 reply; 21+ messages in thread
From: Stefan Monnier @ 2019-04-24 12:52 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Michael Heerdegen, emacs-devel

> That's strange, because if you have the same problem as Stefan, I
> think this is veteran functionality, see my response in bug#35400.

As I said, I think the two issues are separate: my original email
thought that this was the problem, but investigation showed that this
repetition is nothing new, so what we're seeing is caused by
something else.


        Stefan



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-24 12:52             ` Stefan Monnier
@ 2019-04-24 13:17               ` Eli Zaretskii
  2019-04-24 13:26                 ` Stefan Monnier
  0 siblings, 1 reply; 21+ messages in thread
From: Eli Zaretskii @ 2019-04-24 13:17 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: michael_heerdegen, emacs-devel

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Date: Wed, 24 Apr 2019 08:52:15 -0400
> Cc: Michael Heerdegen <michael_heerdegen@web.de>, emacs-devel@gnu.org
> 
> > That's strange, because if you have the same problem as Stefan, I
> > think this is veteran functionality, see my response in bug#35400.
> 
> As I said, I think the two issues are separate: my original email
> thought that this was the problem, but investigation showed that this
> repetition is nothing new, so what we're seeing is caused by
> something else.

So how is what you are seeing different from the "normal" repetition?



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-24 13:17               ` Eli Zaretskii
@ 2019-04-24 13:26                 ` Stefan Monnier
  2019-04-24 13:41                   ` Eli Zaretskii
  0 siblings, 1 reply; 21+ messages in thread
From: Stefan Monnier @ 2019-04-24 13:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: michael_heerdegen, emacs-devel

> So how is what you are seeing different from the "normal" repetition?

It can take almost a minute for Emacs to become responsive after
waking up.  That's much more than running savehist-save 10
times, AFAICT.


        Stefan



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-24 13:26                 ` Stefan Monnier
@ 2019-04-24 13:41                   ` Eli Zaretskii
  2019-04-24 14:52                     ` Stefan Monnier
  0 siblings, 1 reply; 21+ messages in thread
From: Eli Zaretskii @ 2019-04-24 13:41 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: michael_heerdegen, emacs-devel

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: michael_heerdegen@web.de, emacs-devel@gnu.org
> Date: Wed, 24 Apr 2019 09:26:54 -0400
> 
> > So how is what you are seeing different from the "normal" repetition?
> 
> It can take almost a minute for Emacs to become responsive after
> waking up.  That's much more than running savehist-save 10
> times, AFAICT.

And all that time Emacs is running savehist-save?  Or are some other
timers involved?



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-24 13:41                   ` Eli Zaretskii
@ 2019-04-24 14:52                     ` Stefan Monnier
  2019-04-24 15:01                       ` Eli Zaretskii
  0 siblings, 1 reply; 21+ messages in thread
From: Stefan Monnier @ 2019-04-24 14:52 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: michael_heerdegen, emacs-devel

> And all that time Emacs is running savehist-save?
> Or are some other timers involved?

I haven't investigated enough yet to be able to tell.


        Stefan



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-24 14:52                     ` Stefan Monnier
@ 2019-04-24 15:01                       ` Eli Zaretskii
  2019-04-24 15:14                         ` Eli Zaretskii
  0 siblings, 1 reply; 21+ messages in thread
From: Eli Zaretskii @ 2019-04-24 15:01 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: michael_heerdegen, emacs-devel

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: michael_heerdegen@web.de, emacs-devel@gnu.org
> Date: Wed, 24 Apr 2019 10:52:41 -0400
> 
> > And all that time Emacs is running savehist-save?
> > Or are some other timers involved?
> 
> I haven't investigated enough yet to be able to tell.

OK, thanks.  I think I see the problem.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-24 15:01                       ` Eli Zaretskii
@ 2019-04-24 15:14                         ` Eli Zaretskii
  0 siblings, 0 replies; 21+ messages in thread
From: Eli Zaretskii @ 2019-04-24 15:14 UTC (permalink / raw)
  To: monnier, michael_heerdegen; +Cc: emacs-devel

> Date: Wed, 24 Apr 2019 18:01:23 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: michael_heerdegen@web.de, emacs-devel@gnu.org
> 
> > From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> > Cc: michael_heerdegen@web.de, emacs-devel@gnu.org
> > Date: Wed, 24 Apr 2019 10:52:41 -0400
> > 
> > > And all that time Emacs is running savehist-save?
> > > Or are some other timers involved?
> > 
> > I haven't investigated enough yet to be able to tell.
> 
> OK, thanks.  I think I see the problem.

Should be fixed now.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-24  7:38                 ` Michael Heerdegen
@ 2019-04-25  0:10                   ` Michael Heerdegen
  2019-04-26  1:57                     ` Michael Heerdegen
  0 siblings, 1 reply; 21+ messages in thread
From: Michael Heerdegen @ 2019-04-25  0:10 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: monnier, emacs-devel

Michael Heerdegen <michael_heerdegen@web.de> writes:

> For now I'm tracing 'savehist-autosave'.  I get an entry every 5
> minutes.  Let's see how many entries I get when Emacs wakes up from
> Ram next time.

143 calls; which fits exactly one call every five minutes for the 11
hours I had suspended to Ram.  But I guess I'm too late cause you
already fixed it.  Will try your fix.

Thanks,

Michael.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-25  0:10                   ` Michael Heerdegen
@ 2019-04-26  1:57                     ` Michael Heerdegen
  2019-04-26  6:46                       ` Eli Zaretskii
  0 siblings, 1 reply; 21+ messages in thread
From: Michael Heerdegen @ 2019-04-26  1:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: monnier, emacs-devel

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Will try your fix.

I can confirm it's fixed.


Thanks,

Michael.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: accumulated timers which machine is in suspend-to-ram
  2019-04-26  1:57                     ` Michael Heerdegen
@ 2019-04-26  6:46                       ` Eli Zaretskii
  0 siblings, 0 replies; 21+ messages in thread
From: Eli Zaretskii @ 2019-04-26  6:46 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: monnier, emacs-devel

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: monnier@IRO.UMontreal.CA,  emacs-devel@gnu.org
> Date: Fri, 26 Apr 2019 03:57:29 +0200
> 
> Michael Heerdegen <michael_heerdegen@web.de> writes:
> 
> > Will try your fix.
> 
> I can confirm it's fixed.

Great, thank you.



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2019-04-26  6:46 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-20  3:38 accumulated timers which machine is in suspend-to-ram Stefan Monnier
2019-04-21 22:04 ` Michael Heerdegen
2019-04-22  6:41   ` Eli Zaretskii
2019-04-22 18:12     ` Michael Heerdegen
2019-04-22 18:22       ` Eli Zaretskii
2019-04-23 17:06         ` Stefan Monnier
2019-04-23 20:41         ` Michael Heerdegen
2019-04-24  6:54           ` Eli Zaretskii
2019-04-24  7:21             ` Michael Heerdegen
2019-04-24  7:29               ` Eli Zaretskii
2019-04-24  7:38                 ` Michael Heerdegen
2019-04-25  0:10                   ` Michael Heerdegen
2019-04-26  1:57                     ` Michael Heerdegen
2019-04-26  6:46                       ` Eli Zaretskii
2019-04-24 12:52             ` Stefan Monnier
2019-04-24 13:17               ` Eli Zaretskii
2019-04-24 13:26                 ` Stefan Monnier
2019-04-24 13:41                   ` Eli Zaretskii
2019-04-24 14:52                     ` Stefan Monnier
2019-04-24 15:01                       ` Eli Zaretskii
2019-04-24 15:14                         ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).