mmap problem

Prasenjit Sarkar (psarkar@cs.arizona.edu)
Sat, 25 Jan 1997 10:54:14 -0700 (MST)


Hi,

I am trying to implement something similar in idea to write caching. The
kernel I am using is 2.0.23 (compiled by gcc-2.7.2). The driver related
stuff is not related because my problem appears over a variety of
configurations.

My object is to make the kswapd dameon in a client write pages over the network
to a file server. The function is implemented as follows:

Now the kswapd routine (src/linux/mm/vmscan.c) calls the shrink_mmap routine.
Inside the shrink_mmap routine in the client (src/liux/fs/filemap.c), I do a
nfs_rpc_alloc (defined in src/linux/fs/nfs/proc.c) and then a nfs_rpc_call.
(defined in the same place). The RPC message is of size PAGE_SIZE+256.
The problem is as follows:

1. If the call succeeds and the file server gives back a NFS_OK (implying
that the rpc was a success), everything is fine.

2. If the call times out because the file server is slow or down, I get
the following messages and the kernel hangs. This behavior is particular
to the kswapd thread and does not occur in the other nfs routines.

Jan 24 17:01:52 pe01 kernel: CNFS server pe02 not responding, timed out.
Jan 24 17:01:52 pe01 kernel: kfree of non-kmalloced memory: 00318018, next= 00000000, order=8
Jan 24 17:01:52 pe01 kernel: RPC: rpc_send sending evil packet:
Jan 24 17:01:52 pe01 kernel: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Idle task may not sleep
Idle task may not sleep
Idle task may not sleep

I saw a posting with a similar kfree problem but dont know if the solution
is the same.

Thanks,
Prasenjit