[LWN Logo]

From:	Russell King <rmk@arm.linux.org.uk>
Subject: NFS/sound problems appear to be due to huge latency with kswapd
To:	linux-kernel@vger.rutgers.edu
Date:	Sat, 25 Mar 2000 22:02:05 +0000 (GMT)

Hi,

Over the past week, I've posted various messages to Linux kernel about
various NFS and sound problems on 2.3.99, some of them have turned out
to be bugs in the ARM code, but there is one in particular which has
been difficult to find.

This problem is where I play mp3s on a machine, and the mp3s are stored
remotely.

By adding various debugs and so forth to the kernel, I think I've found
the culprit: kswapd.

kswapd appears to take a long time to complete its task regularly (200ms+
on occasion).  Here is the messages that indicate this:

0000e943: RPC: 2426 removed from queue c103a048 "xprt_pending"
0000e943: RPC: 2426 added to queue c01ad5d4 "schedq"
0000e943: need_resched = 1, comm = mxaudio
0000e943: RPC:      __rpc_wake_up done
kswapd: awake at 59715
0000e943: RPC: 2427 __rpc_wake_up (now 59715 inh 0)
0000e943: RPC: 2427 __rpc_wake_up (now 59715 inh 0)
0000e943: RPC: 2427 removed from queue c103a048 "xprt_pending"
0000e943: RPC: 2427 added to queue c01ad5d4 "schedq"
0000e943: need_resched = 0, comm = kswapd
0000e943: RPC:      __rpc_wake_up done
kswapd: sleep at 59744
0000e960: RPC: switch to rpciod
0000e960: RPC:      rpc_schedule enter
...
kswapd: awake at 65355
kswapd: sleep at 65394
...
kswapd: awake at 79811
kswapd: sleep at 79812
...
kswapd: awake at 82853
kswapd: sleep at 82892
...
kswapd: awake at 102281
kswapd: sleep at 102320

Sometimes it takes around 10ms to do its job, other times it can be as high
as 400ms.  Obviously this is not good for interactive performance, let alone
using anything like sound under Linux.

I'm not sure if this is an ARM specific problem, but I wouldn't have thought
so.  It may be related to the problem where the cached data takes over all
the memory, but I'm not sure.

/proc/meminfo indicates:

        total:    used:    free:  shared: buffers:  cached:
Mem:  30887936 30339072   548864        0    86016 20320256
Swap: 66056192        0 66056192
...
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |         Russell King        rmk@arm.linux.org.uk      --- ---
  | | | |   http://www.arm.linux.org.uk/~rmk/aboutme.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/