Hi Mulyadi, On Thu, Aug 28, 2008 at 9:55 PM, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote: > I only have one suspicion I can offer right now: delayed page fault? > > I mean...yes, calloc AFAIK will initialize all the pages with a value, > however...that task doesn't really read it, right? I modified the program to do the following : Process A: After the calloc() , I do a write to all the pages (actually all the memory). Then I start Process B, which does the same as A : calloc() lot of memory then write to all the memory. This causes a lot of swapping as moslty A's pages are swapped to disk. Next, when I make process A do a timed read of all the memory, it takes the same time as before Process B started. But if I make Process A do a timed write to all memory again then I can see the difference in timing. It takes much longer to do a write now and I can hear the HDD as Process A's pages are swapped in. As far as I understand, after A's pages are swapped to disk, if it does a timed read to all its memory, it should get swapped in and cause a large delay. But this only happens for write, hence my confusion. I'm missing something here and I don't know what. > And don't forget there is read-ahead mechanism too. So when you > "touch" a page, few more pages are actually faulted in too > sequentially. That could add slightly more overhead (for read). Yes, I know about read-ahead for swap-in but I don't think thats causing the it because I modified the kernel to report which process pages are being swapped in. It does not report A as being swapped in when I get A to do a timed read of its pages. Is there some other experiment I could do to figure out whats going on ? What about AMD64 tagged cache and TLB, could it be those causing this ? Thanks arn -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ