Heavy disk I/O on temporary mmap'ed files (ext4)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am developing a software based DSM. In order to avoid concurrent
updates on a memory page that is being updated by the runtime I am
using a shadow mapping to perform the updates. This mappings are
created by opening a file, unlinking it and mmap-ing on the file
descriptor. Everything is working but I am experiencing heavy disk I/O
during execution on a machine with a single ext4 file system. Other
machines that use ext3 partitions don't exhibit this behavior (there
is no disk I/O at all). This machine is using the kernel version
2.6.35-25-generic.

The exact steps performed to create the mappings are:

    // Create the file
    snprintf(tmp, FILENAME_MAX, "/tmp/testXXXXXX");
    int fd = mkstemp(tmp);
    if(fd < 0) return NULL;
    unlink(tmp);

    if(ftruncate(fd, count) < 0) {
        close(fd);
        return NULL;
    }
    ...

    // Create a mapping
    addr = mmap(NULL, count, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);


Does ext4 write to mmap'ed files although they don't have a name in
the file system? Am I doing anything wrong?

Thanks,
  Javi
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux