On Sat, 9 Apr 2011, Sasha Levin wrote:
+struct disk_image *disk_image__new(int fd, uint64_t size)
+{
+       struct disk_image *self;
+
+       self            = malloc(sizeof *self);
+       if (!self)
+               return NULL;
+
+       self->fd     = fd;
+       self->size   = size;
+       self->priv   = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | 
MAP_NORESERVE, fd, 0);

This needs to be MAP_SHARED to preserve the same semantics. Does it still show a performance improvement if you change it?

                        Pekka
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to