mmap() of /dev/kmem issue

Mario Smarduch
2004-05-04T16:30:21Z

I have problem of viewing memory contents via mmap()
of /dev/kmem. After mmap()'ing /dev/kmem for reading
it appears that data accessed in the kernel lives in
different cache lines from data accessed in the user space.
The lseek()/read() from kernel reflects latest updates,
but same reads from user space mmap fetches old data, and
vice versa when updating from user. When I flush the
caches (cat of a big file to another file), then user mapped
value reflects the latest changes but then again remains
frozen. I'm having trouble understanding how can this
happen since the caches are physically indexed.
Any ideas what the problem could be?

- Mario.