All of lore.kernel.org
 help / color / mirror / Atom feed
* 'swapper' process using 100% cpu when system idle
@ 2010-06-28 22:35 Chris Tapp
  2010-06-29  0:09 ` Khem Raj
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Tapp @ 2010-06-28 22:35 UTC (permalink / raw)
  To: openembedded-devel

I'm using a console-image for angstrom-2008.1 / x86.

It all builds well and runs. However, both on my target hardware  
(Geode LX800) and under Qemu the 'swapper' process is running at 100%  
cpu when the system is doing nothing e.g. after booting).

'top' shows that the cpu is never idle.

Is this 'as expected', or should I be adding something to the build to  
enable the cpu to idle?

Chris




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

* Re: 'swapper' process using 100% cpu when system idle
  2010-06-28 22:35 'swapper' process using 100% cpu when system idle Chris Tapp
@ 2010-06-29  0:09 ` Khem Raj
  2010-06-29 13:39   ` Chris Tapp
  0 siblings, 1 reply; 9+ messages in thread
From: Khem Raj @ 2010-06-29  0:09 UTC (permalink / raw)
  To: openembedded-devel

On Mon, Jun 28, 2010 at 3:35 PM, Chris Tapp <dokuwiki@keylevel.com> wrote:
> I'm using a console-image for angstrom-2008.1 / x86.
>
> It all builds well and runs. However, both on my target hardware (Geode
> LX800) and under Qemu the 'swapper' process is running at 100% cpu when the
> system is doing nothing e.g. after booting).
>
> 'top' shows that the cpu is never idle.
>
> Is this 'as expected', or should I be adding something to the build to
> enable the cpu to idle?
>

try using different kernel version

> Chris
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



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

* Re: 'swapper' process using 100% cpu when system idle
  2010-06-29  0:09 ` Khem Raj
@ 2010-06-29 13:39   ` Chris Tapp
  2010-06-29 18:52     ` Khem Raj
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Tapp @ 2010-06-29 13:39 UTC (permalink / raw)
  To: openembedded-devel

> try using different kernel version

Ok - is it as simple as adding (for example)

PREFERRED_VERSION_linux = "2.6.18"

to <my_console_image.bb> ?

Chris




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

* Re: 'swapper' process using 100% cpu when system idle
  2010-06-29 13:39   ` Chris Tapp
@ 2010-06-29 18:52     ` Khem Raj
  2010-06-29 22:32       ` Chris Tapp
  0 siblings, 1 reply; 9+ messages in thread
From: Khem Raj @ 2010-06-29 18:52 UTC (permalink / raw)
  To: openembedded-devel

On Tue, Jun 29, 2010 at 6:39 AM, Chris Tapp <dokuwiki@keylevel.com> wrote:
>> try using different kernel version
>
> Ok - is it as simple as adding (for example)
>
> PREFERRED_VERSION_linux = "2.6.18"
>
> to <my_console_image.bb> ?

on .dev
well look at the kernel recipe you want
to go to and add

DEFAULT_PREFERENCE_<yourmachine> = "1"
you might have to provide defconfig also.

>
> Chris
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



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

* Re: 'swapper' process using 100% cpu when system idle
  2010-06-29 18:52     ` Khem Raj
@ 2010-06-29 22:32       ` Chris Tapp
  2010-06-29 22:38         ` Martin Jansa
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Tapp @ 2010-06-29 22:32 UTC (permalink / raw)
  To: openembedded-devel

> on .dev
> well look at the kernel recipe you want
> to go to and add
>
> DEFAULT_PREFERENCE_<yourmachine> = "1"
> you might have to provide defconfig also.


Thanks

I'm getting 2.6.35-rc3 included in the build at the moment (for  
'linux'). I couldn't find a recipe for this and it took me a while to  
work out that it was linux_git.bb that was getting used!

This file has DEFAULT_PREFERENCE = -1. However, it seems as if none of  
the other linux_x.y.z.bb files specify a value for my machine (x86)  
and they all have a DEFAULT_PREFERENCE of -1.

Given this, I now understand why the _git version is being pulled in :-)

Why does the _git version (which I assume gives a 'bleeding edge'  
version) have the same preference value as the recipes for released  
versions? Would setting it to -2  be sensible?

I'll go add a DEFAULT_PREFERENCE_x86 = "1" line to the one I want, as  
per your recommendation and start a rebuild...

Chris




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

* Re: 'swapper' process using 100% cpu when system idle
  2010-06-29 22:32       ` Chris Tapp
@ 2010-06-29 22:38         ` Martin Jansa
  2010-06-30  0:01           ` Chris Tapp
  0 siblings, 1 reply; 9+ messages in thread
From: Martin Jansa @ 2010-06-29 22:38 UTC (permalink / raw)
  To: openembedded-devel

On Tue, Jun 29, 2010 at 11:32:19PM +0100, Chris Tapp wrote:
> >on .dev
> >well look at the kernel recipe you want
> >to go to and add
> >
> >DEFAULT_PREFERENCE_<yourmachine> = "1"
> >you might have to provide defconfig also.
> 
> 
> Thanks
> 
> I'm getting 2.6.35-rc3 included in the build at the moment (for
> 'linux'). I couldn't find a recipe for this and it took me a while
> to work out that it was linux_git.bb that was getting used!
> 
> This file has DEFAULT_PREFERENCE = -1. However, it seems as if none
> of the other linux_x.y.z.bb files specify a value for my machine
> (x86) and they all have a DEFAULT_PREFERENCE of -1.

http://docs.openembedded.org/usermanual/html/recipes_defaultpreference.html
The default preference (when no DEFAULT_PREFERENCE is specified) is zero.

That's why I used only -1 when I added it. But if you have machine which
has DEFAULT_PREFERENCE -1 in all other linux recipes (positive values
are usualy assigned only for machines known to work) then you're right
it will pull it.

I'll decrease it to -2 with SRCREV bump I have in my queue..

Regards,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com



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

* Re: 'swapper' process using 100% cpu when system idle
  2010-06-29 22:38         ` Martin Jansa
@ 2010-06-30  0:01           ` Chris Tapp
  2010-06-30  1:27             ` Chris Hallinan
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Tapp @ 2010-06-30  0:01 UTC (permalink / raw)
  To: openembedded-devel

Well, I've changed the kernel version from 2.6.35-rc3 to 2.6.25.

The 'swapper' process is still running at 100% cpu and the cpu never  
idles when nothing else is active (under Qemu and my hardware).

Any other ideas what can cause this?

Chris




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

* Re: 'swapper' process using 100% cpu when system idle
  2010-06-30  0:01           ` Chris Tapp
@ 2010-06-30  1:27             ` Chris Hallinan
  2010-06-30  8:47               ` Chris Tapp
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Hallinan @ 2010-06-30  1:27 UTC (permalink / raw)
  To: openembedded-devel

On Tue, Jun 29, 2010 at 8:01 PM, Chris Tapp <dokuwiki@keylevel.com> wrote:
> Well, I've changed the kernel version from 2.6.35-rc3 to 2.6.25.
>
> The 'swapper' process is still running at 100% cpu and the cpu never idles
> when nothing else is active (under Qemu and my hardware).
>
> Any other ideas what can cause this?
>

Well, I can only guess, but you may have a misbehaving application.  I
experienced something similar on a laptop, and didn't even know it
until I unplugged and took an airplane ride.  In 2 hours, my 6+ hour
battery was dead...an HP scanner driver was consuming 99% CPU even
though the scanner was not even plugged into the laptop!  Bad me for
trusting, and bad HP for a dumb design (or even dumber bug!)

If you can, try selectively killing applications until the condition
goes away.  Also, you didn't mention how much memory you're system
has, you may be overwhelming it.  And by 'swapper' I presume you mean
kswapd?

Alternatively, start out with as minimal a system as possible, ie just
start a shell, then mount /proc and see what's going on using ps/top,
etc. Then manually walk through your system init until you find the
offender, if it's userspace at all.  Given that you changed kernel
versions and still have the issue, that points more towards apps.

Good luck,

Chris



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

* Re: 'swapper' process using 100% cpu when system idle
  2010-06-30  1:27             ` Chris Hallinan
@ 2010-06-30  8:47               ` Chris Tapp
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Tapp @ 2010-06-30  8:47 UTC (permalink / raw)
  To: openembedded-devel

> Well, I can only guess, but you may have a misbehaving application.  I
> experienced something similar on a laptop, and didn't even know it
> until I unplugged and took an airplane ride.  In 2 hours, my 6+ hour
> battery was dead...an HP scanner driver was consuming 99% CPU even
> though the scanner was not even plugged into the laptop!  Bad me for
> trusting, and bad HP for a dumb design (or even dumber bug!)
>
> If you can, try selectively killing applications until the condition
> goes away.  Also, you didn't mention how much memory you're system
> has, you may be overwhelming it.  And by 'swapper' I presume you mean
> kswapd?
>
> Alternatively, start out with as minimal a system as possible, ie just
> start a shell, then mount /proc and see what's going on using ps/top,
> etc. Then manually walk through your system init until you find the
> offender, if it's userspace at all.  Given that you changed kernel
> versions and still have the issue, that points more towards apps.

Thanks - this is a very basic image (basically just console-image) and  
has nothing running. 'swapper' is process '1' and top shows that all  
cpu is used by it as 'system' time - the 'idle' time counter always  
shows 0%.

Chris



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

end of thread, other threads:[~2010-06-30  8:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-28 22:35 'swapper' process using 100% cpu when system idle Chris Tapp
2010-06-29  0:09 ` Khem Raj
2010-06-29 13:39   ` Chris Tapp
2010-06-29 18:52     ` Khem Raj
2010-06-29 22:32       ` Chris Tapp
2010-06-29 22:38         ` Martin Jansa
2010-06-30  0:01           ` Chris Tapp
2010-06-30  1:27             ` Chris Hallinan
2010-06-30  8:47               ` Chris Tapp

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.