linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Cc: Merlijn Wajer <merlijn@wizzup.org>,
	linux-omap <linux-omap@vger.kernel.org>,
	phone-devel@vger.kernel.org, maemo-leste@lists.dyne.org,
	Pavel Machek <pavel@ucw.cz>, Sebastian Reichel <sre@kernel.org>,
	Dev Null <devnull@uvos.xyz>,
	Andreas Kemnade <andreas@kemnade.info>,
	"H. Nikolaus Schaller" <hns@goldelico.com>,
	Nitin Gupta <nigupta@nvidia.com>,
	Charan Teja Reddy <charante@codeaurora.org>
Subject: Re: Nokia N900 not hitting OFF mode since 5.9 is caused by proactive memory compaction
Date: Tue, 12 Apr 2022 12:53:45 +0300	[thread overview]
Message-ID: <YlVMKb04CWSvgZ/1@atomide.com> (raw)
In-Reply-To: <a6682d1c-acab-72d3-bbe6-62e6d40a4832@gmail.com>

* Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> [220103 14:45]:
> Hi,
> 
> On 10.12.21 г. 9:20 ч., Tony Lindgren wrote:
> > Hi,
> > 
> > * Merlijn Wajer <merlijn@wizzup.org> [211210 00:34]:
> > > Hi,
> > > 
> > > I've spent the day bisecting what exact commit prevented the Nokia N900
> > > from entering the OFF sleep state (between v5.8 and v5.9), and it this
> > > commit:
> > > 
> > > > # first bad commit: [facdaa917c4d5a376d09d25865f5a863f906234a] mm: proactive compaction
> > > 
> > > The git tree prior to that commit can idle at about ~27mW in OFF mode,
> > > and it will often remain in that mode for prolonged amounts of time
> > > (easily 30 seconds, depending on running userspace). Which the above
> > > commit applied, the Nokia N900 almost never hits OFF mode any more. This
> > > would suggest at least to disable CONFIG_COMPACTION, perhaps in
> > > omap2plus_defconfig? I suspect this might cause idle problems beyond the
> > > Nokia N900, too.
> > 
> > Nice find, adding Nitin to Cc as well. Nitin, can we somehow avoid the
> > timers for CONFIG_COMPACTION on an idle system to prevent waking up the
> > system unnecessarily?
> > 
> > Not sure if sysctl -w vm.compaction_proactiveness=0 is enough to disable
> > compaction for idle, maybe also the HPAGE_FRAG_CHECK_INTERVAL_MSEC = 500
> > at ms also causes extra wake-ups?
> > 
> 
> This doesn't seem to affect Nokia N900 only, waking-up twice a second will
> have negative effect on power usage of every device this runs on. Could we
> have some discussion on how to avoid that?

Just following up on this as I had it tagged in my inbox.

There's kernel commit 65d759c8f9f5 ("mm: compaction: support triggering of
proactive compaction by user") that should fix this issue.

It seems to require the the following to disable compaction:

# echo 0 > /proc/sys/vm/compaction_proactiveness

Merlijn, care to check if this fixes the issue you're seeing? Or are threre
possibly other bugs too preventing n900 from properly idling?

Regards,

Tony

      reply	other threads:[~2022-04-12 11:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10  0:39 Nokia N900 not hitting OFF mode since 5.9 is caused by proactive memory compaction Merlijn Wajer
2021-12-10  7:20 ` Tony Lindgren
2021-12-10  9:47   ` Merlijn Wajer
2021-12-16 15:23   ` Merlijn Wajer
2022-01-03 14:44   ` Ivaylo Dimitrov
2022-04-12  9:53     ` Tony Lindgren [this message]

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=YlVMKb04CWSvgZ/1@atomide.com \
    --to=tony@atomide.com \
    --cc=andreas@kemnade.info \
    --cc=charante@codeaurora.org \
    --cc=devnull@uvos.xyz \
    --cc=hns@goldelico.com \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=maemo-leste@lists.dyne.org \
    --cc=merlijn@wizzup.org \
    --cc=nigupta@nvidia.com \
    --cc=pavel@ucw.cz \
    --cc=phone-devel@vger.kernel.org \
    --cc=sre@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 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 NNTP newsgroup(s).