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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20131016071119.GE22509@gmail.com>
Date:	Wed, 16 Oct 2013 09:11:19 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	David Ahern <dsahern@...il.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...hat.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Mike Galbraith <efault@....de>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 3/3] perf record: mmap output file


* David Ahern <dsahern@...il.com> wrote:

> On 10/15/13 10:06 AM, Ingo Molnar wrote:

> > splice() is very fast and should be able to process a lot of pages in 
> > one go, so the feedback loop should be pretty weak. mmap() triggers 
> > kernel code as well, every time we run out of the 64 MB window we got 
> > to remap it, right?
> 
> 
> Yes, 1 mmap, 1 munmap for every 64MB. Compare to the write() case which 
> calls write() for each mmap each time through the mmap_read loop.
> 
> I am conjecturing that splice would follow the write model in the sense 
> of a ring buffer has N bytes, call splice to copy the data from the ring 
> buffer to the file. So, splice saves on the memcpy, but not the 
> syscalls.

Well, splice can be 64 MB granular as well - but it depends on how 
buffered the pipes are (splice always uses pipes to shuffle around pages).

It's possible to have pipes with larger buffering - see F_SETPIPE_SZ. The 
current limit (for unprivileged users?) is:

  fs/pipe.c:unsigned int pipe_max_size = 1048576;

[But I haven't actually used this to increase splice() size yet.]

Thanks,

	Ingo
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ