kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Question on mmap / expecting more calls to vfs_read
@ 2011-01-05 20:16 Sebastian Pipping
  2011-01-05 22:15 ` Mulyadi Santosa
  0 siblings, 1 reply; 9+ messages in thread
From: Sebastian Pipping @ 2011-01-05 20:16 UTC (permalink / raw)
  To: kernelnewbies

Hello!


Intro / context
===============
I'm trying to get a precise list of file names, offsets and byte counts
of all read and write operations.  I need that information to feed it
into a simulator I am working on.  I am running qemu-kvm with a slightly
patched Linux kernel (additions of calls to printk only) sucking the
kernel log from the serial console (kernel option
earlyprintk=serial,keep) to a file.  The setup itself works okay for me.


Question / problem
==================
When analyzing the kernel logs I produced I noticed stumbled over the
case of a few libraries where only the beginning of the file (maybe its
ELF header) was read repeated times, but nothing after:

  file                   /lib/ld-2.11.2.so
  max offset+count       456
  total bytes read ever  502840

Especially as libc is among them, I guess some reads pass by me somehow.
Any ideas what is shoveling the file bytes around?

I found calls to do_mmap_pgoff for these file, though.
That's when I thought I may need help understanding how mmap works.

Is data read into the mapped region instantly all at once?  Or is it
feed into it on demand when the kernel gets read requests to a mapped
area?  In either case, where does the data come from if neither vfs_read
nor do_readv_writev are ever called on the rest of the file?


Thanks in advance for any help.




Sebastian

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

end of thread, other threads:[~2011-01-12  5:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-05 20:16 Question on mmap / expecting more calls to vfs_read Sebastian Pipping
2011-01-05 22:15 ` Mulyadi Santosa
2011-01-06  6:53   ` Rajat Sharma
2011-01-06 23:49     ` Sebastian Pipping
2011-01-07  0:09       ` Manish Katiyar
2011-01-07  6:26         ` Rajat Sharma
2011-01-07  6:30           ` Rajat Sharma
2011-01-11 19:16           ` Sebastian Pipping
2011-01-12  5:12             ` Rajat Sharma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).