All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@kernel.org>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] kvm tools: Use mmap for working with disk image V3
Date: Sat, 9 Apr 2011 15:38:53 +0300 (EEST)	[thread overview]
Message-ID: <alpine.DEB.2.00.1104091538110.8221@tiger> (raw)
In-Reply-To: <1302351545-5214-1-git-send-email-levinsasha928@gmail.com>

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

  reply	other threads:[~2011-04-09 12:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-09 12:19 [PATCH] kvm tools: Use mmap for working with disk image V3 Sasha Levin
2011-04-09 12:38 ` Pekka Enberg [this message]
2011-04-09 13:26 ` Anthony Liguori
2011-04-09 13:34   ` Pekka Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.00.1104091538110.8221@tiger \
    --to=penberg@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.