Chinaunix首页 | 论坛 | 博客
  • 博客访问: 633397
  • 博文数量: 75
  • 博客积分: 7001
  • 博客等级: 少将
  • 技术积分: 1465
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-11 17:39
文章分类

全部博文(75)

文章存档

2010年(1)

2009年(25)

2008年(49)

我的朋友

分类: LINUX

2008-12-23 17:05:01




[01] swapper process can not be stops.
--------------------------------------------------------------------------------
Description:

Recently, I do some work related to PM subsystem. My aim is to put system into sleep mode. Some hardware-dependent work has been implemented in “pm.c” and “sleep.S”.

As is known to all, PM subsystem provides interface “pm_suspend()” to achieve this goal, which can be invoked by issuing:

“echo mem > /sys/power/state”

But, after issuing the above command, it comes out something abnormal as follows:

# echo mem > /sys/power/state
Stopping tasks: ===============
stopping tasks timed out after 20 seconds (1 tasks remaining):
   swapper
Restarting tasks...<6> Strange, swapper not stopped
  Done

The above logs tell that there is one process called “swapper” cannot be stopped.

My question is “What’s this “swapper” process is?”, “Under what condition, the process will be spawned?”

Thanks in advance!

To see what’s the process, execute ps command:

# ps aux

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  2.4  0.5   1500   560 ?        Ss   00:00   0:01 init [3]
root         2  0.0  0.0      0     0 ?        S    00:00   0:00 [posix_cpu_tim]
root         3  0.0  0.0      0     0 ?        S    00:00   0:00 [softirq-high/]
root         4  0.0  0.0      0     0 ?        S    00:00   0:00 [softirq-timer]
root         5  0.0  0.0      0     0 ?        S    00:00   0:00 [softirq-net-t]
root         6  0.0  0.0      0     0 ?        S    00:00   0:00 [softirq-net-r]
root         7  0.0  0.0      0     0 ?        S    00:00   0:00 [softirq-block]
root         8  0.0  0.0      0     0 ?        S    00:00   0:00 [softirq-taskl]
root         9  0.0  0.0      0     0 ?        S    00:00   0:00 [softirq-rcu/0]
root        10  0.1  0.0      0     0 ?        S<   00:00   0:00 [desched/0]
root        11  0.0  0.0      0     0 ?        S<   00:00   0:00 [events/0]
root        12  0.1  0.0      0     0 ?        S<   00:00   0:00 [khelper]
root        13  0.0  0.0      0     0 ?        S<   00:00   0:00 [kthread]
root        22  0.0  0.0      0     0 ?        S<   00:00   0:00 [kblockd/0]
root        23  0.0  0.0      0     0 ?        S<   00:00   0:00 [kseriod]
root        57  0.0  0.0      0     0 ?        S    00:00   0:00 [pdflush]
root        58  0.0  0.0      0     0 ?        S    00:00   0:00 [pdflush]
root        59  0.0  0.0      0     0 ?        S<   00:00   0:00 [kswapd0]
root        60  0.0  0.0      0     0 ?        S<   00:00   0:00 [aio/0]
root       174  0.0  0.0      0     0 ?        S    00:00   0:00 [mtdblockd]
root       188  0.0  0.0      0     0 ?        S<   00:00   0:00 [EVB1226-SPI.0]
root     204  0.0  0.0    0     0 ?      D   00:00  0:00 [swapper]   ?-----------------------------------------------
root       207  5.0  0.0      0     0 ?        S<   00:00   0:02 [rpciod/0]
root       284  2.5  0.5   1704   556 ?        Sbin        926  0.3  0.3   1656   368 ?        Ss   00:00   0:00 /sbin/portmap
root       960  1.5  0.6   1576   584 ?        Ss   00:00   0:00 /sbin/syslogd -
root       968  0.3  0.4   1500   392 ?        Ss   00:00   0:00 /sbin/klogd -x

solution:

It's due to VSP(virtual serial port) driver in the case of my kernel.
Choosing VSP as module, instead of compiling it into kernel while configure kernel, could solve the problem.

conclusion:

Just as the author of the following article said, the D state process (swapper), which is in uninterruptable sleep conditon, usually is caused by device driver.






阅读(1775) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~