lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <AANLkTikKWibkcV+ErcBe=C0oT3cyWH_2rfE9uv3qxsSN@mail.gmail.com>
Date:	Mon, 7 Feb 2011 01:41:01 -0600
From:	Javi <javier.cabezas@...il.com>
To:	linux-ext4@...r.kernel.org
Subject: Heavy disk I/O on temporary mmap'ed files (ext4)

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ