[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131009133331.GC5459@krava.redhat.com>
Date: Wed, 9 Oct 2013 15:33:31 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: David Ahern <dsahern@...il.com>
Cc: acme@...stprotocols.net, linux-kernel@...r.kernel.org,
Ingo Molnar <mingo@...nel.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Namhyung Kim <namhyung@...nel.org>,
Mike Galbraith <efault@....de>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] perf record: mmap output file - RFC
On Sun, Sep 22, 2013 at 08:05:59PM -0600, David Ahern wrote:
SNIP
> +
> + if (size > remaining) {
> + memcpy(rec->mmap_addr + rec->mmap_offset, buf, remaining);
> + rec->bytes_written += remaining;
> +
> + size -= remaining;
> + buf += remaining;
> +
> + msync(rec->mmap_addr, rec->mmap_size, MS_ASYNC);
> + munmap(rec->mmap_addr, rec->mmap_size);
do we need msync call if munmap is called right away?
> + goto do_mmap;
SNIP
> + if (rec->use_mmap) {
> + off_t len = rec->bytes_at_mmap_start + rec->bytes_written;
> +
> + rec->use_mmap = false;
> + msync(rec->mmap_addr, rec->mmap_size, MS_ASYNC);
> + munmap(rec->mmap_addr, rec->mmap_size);
ditto
thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists