<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/pipe.c, branch v2.6.17</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>[PATCH] vmsplice: restrict stealing a little more</title>
<updated>2006-05-02T13:29:57+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-05-02T13:29:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=330ab71619bacc4d4494227a6cfc9b7f5500403d'/>
<id>330ab71619bacc4d4494227a6cfc9b7f5500403d</id>
<content type='text'>
Apply the same rules as the anon pipe pages, only allow stealing
if no one else is using the page.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apply the same rules as the anon pipe pages, only allow stealing
if no one else is using the page.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] pipe: enable atomic copying of pipe data to/from user space</title>
<updated>2006-05-01T18:02:05+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-05-01T18:02:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f6762b7ad8edd6abc802542ce845d3bc8adcb92f'/>
<id>f6762b7ad8edd6abc802542ce845d3bc8adcb92f</id>
<content type='text'>
The pipe -&gt;map() method uses kmap() to virtually map the pages, which
is both slow and has known scalability issues on SMP. This patch enables
atomic copying of pipe pages, by pre-faulting data and using kmap_atomic()
instead.

lmbench bw_pipe and lat_pipe measurements agree this is a Good Thing. Here
are results from that on a UP machine with highmem (1.5GiB of RAM), running
first a UP kernel, SMP kernel, and SMP kernel patched.

Vanilla-UP:
Pipe bandwidth: 1622.28 MB/sec
Pipe bandwidth: 1610.59 MB/sec
Pipe bandwidth: 1608.30 MB/sec
Pipe latency: 7.3275 microseconds
Pipe latency: 7.2995 microseconds
Pipe latency: 7.3097 microseconds

Vanilla-SMP:
Pipe bandwidth: 1382.19 MB/sec
Pipe bandwidth: 1317.27 MB/sec
Pipe bandwidth: 1355.61 MB/sec
Pipe latency: 9.6402 microseconds
Pipe latency: 9.6696 microseconds
Pipe latency: 9.6153 microseconds

Patched-SMP:
Pipe bandwidth: 1578.70 MB/sec
Pipe bandwidth: 1579.95 MB/sec
Pipe bandwidth: 1578.63 MB/sec
Pipe latency: 9.1654 microseconds
Pipe latency: 9.2266 microseconds
Pipe latency: 9.1527 microseconds

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The pipe -&gt;map() method uses kmap() to virtually map the pages, which
is both slow and has known scalability issues on SMP. This patch enables
atomic copying of pipe pages, by pre-faulting data and using kmap_atomic()
instead.

lmbench bw_pipe and lat_pipe measurements agree this is a Good Thing. Here
are results from that on a UP machine with highmem (1.5GiB of RAM), running
first a UP kernel, SMP kernel, and SMP kernel patched.

Vanilla-UP:
Pipe bandwidth: 1622.28 MB/sec
Pipe bandwidth: 1610.59 MB/sec
Pipe bandwidth: 1608.30 MB/sec
Pipe latency: 7.3275 microseconds
Pipe latency: 7.2995 microseconds
Pipe latency: 7.3097 microseconds

Vanilla-SMP:
Pipe bandwidth: 1382.19 MB/sec
Pipe bandwidth: 1317.27 MB/sec
Pipe bandwidth: 1355.61 MB/sec
Pipe latency: 9.6402 microseconds
Pipe latency: 9.6696 microseconds
Pipe latency: 9.6153 microseconds

Patched-SMP:
Pipe bandwidth: 1578.70 MB/sec
Pipe bandwidth: 1579.95 MB/sec
Pipe bandwidth: 1578.63 MB/sec
Pipe latency: 9.1654 microseconds
Pipe latency: 9.2266 microseconds
Pipe latency: 9.1527 microseconds

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] pipe: introduce -&gt;pin() buffer operation</title>
<updated>2006-05-01T17:59:03+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-05-01T17:59:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f84d751994441292593523c7069ed147176f6cab'/>
<id>f84d751994441292593523c7069ed147176f6cab</id>
<content type='text'>
The -&gt;map() function is really expensive on highmem machines right now,
since it has to use the slower kmap() instead of kmap_atomic(). Splice
rarely needs to access the virtual address of a page, so it's a waste
of time doing it.

Introduce -&gt;pin() to take over the responsibility of making sure the
page data is valid. -&gt;map() is then reduced to just kmap(). That way we
can also share a most of the pipe buffer ops between pipe.c and splice.c

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The -&gt;map() function is really expensive on highmem machines right now,
since it has to use the slower kmap() instead of kmap_atomic(). Splice
rarely needs to access the virtual address of a page, so it's a waste
of time doing it.

Introduce -&gt;pin() to take over the responsibility of making sure the
page data is valid. -&gt;map() is then reduced to just kmap(). That way we
can also share a most of the pipe buffer ops between pipe.c and splice.c

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] splice: fix bugs in pipe_to_file()</title>
<updated>2006-05-01T17:50:48+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-05-01T17:50:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0568b409c74f7a125d92a09a3f386785700ef688'/>
<id>0568b409c74f7a125d92a09a3f386785700ef688</id>
<content type='text'>
Found by Oleg Nesterov &lt;oleg@tv-sign.ru&gt;, fixed by me.

- Only allow full pages to go to the page cache.
- Check page != buf-&gt;page instead of using PIPE_BUF_FLAG_STOLEN.
- Remember to clear 'stolen' if add_to_page_cache() fails.

And as a cleanup on that:

- Make the bottom fall-through logic a little less convoluted. Also make
  the steal path hold an extra reference to the page, so we don't have
  to differentiate between stolen and non-stolen at the end.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Found by Oleg Nesterov &lt;oleg@tv-sign.ru&gt;, fixed by me.

- Only allow full pages to go to the page cache.
- Check page != buf-&gt;page instead of using PIPE_BUF_FLAG_STOLEN.
- Remember to clear 'stolen' if add_to_page_cache() fails.

And as a cleanup on that:

- Make the bottom fall-through logic a little less convoluted. Also make
  the steal path hold an extra reference to the page, so we don't have
  to differentiate between stolen and non-stolen at the end.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] splice: fix bugs with stealing regular pipe pages</title>
<updated>2006-04-30T14:36:32+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-04-30T14:36:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=46e678c96bbd775abd05d3ddbe2fd334794f9157'/>
<id>46e678c96bbd775abd05d3ddbe2fd334794f9157</id>
<content type='text'>
- Check that page has suitable count for stealing in the regular pipes.
- pipe_to_file() assumes that the page is locked on succesful steal, so
  do that in the pipe steal hook
- Missing unlock_page() in add_to_page_cache() failure.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Check that page has suitable count for stealing in the regular pipes.
- pipe_to_file() assumes that the page is locked on succesful steal, so
  do that in the pipe steal hook
- Missing unlock_page() in add_to_page_cache() failure.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] splice: add support for sys_tee()</title>
<updated>2006-04-11T13:51:17+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-04-11T13:51:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=70524490ee2ea1bbf6cee6c106597b3ac25a3fc2'/>
<id>70524490ee2ea1bbf6cee6c106597b3ac25a3fc2</id>
<content type='text'>
Basically an in-kernel implementation of tee, which uses splice and the
pipe buffers as an intelligent way to pass data around by reference.

Where the user space tee consumes the input and produces a stdout and
file output, this syscall merely duplicates the data inside a pipe to
another pipe. No data is copied, the output just grabs a reference to the
input pipe data.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Basically an in-kernel implementation of tee, which uses splice and the
pipe buffers as an intelligent way to pass data around by reference.

Where the user space tee consumes the input and produces a stdout and
file output, this syscall merely duplicates the data inside a pipe to
another pipe. No data is copied, the output just grabs a reference to the
input pipe data.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] another round of fs/pipe.c cleanups</title>
<updated>2006-04-11T11:57:45+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2006-04-11T11:57:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=341b446bc5aa36d1d5b8159c1e66716b5d89024d'/>
<id>341b446bc5aa36d1d5b8159c1e66716b5d89024d</id>
<content type='text'>
make pipe.c a bit more readable and hackable.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
make pipe.c a bit more readable and hackable.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] pipe.c/fifo.c code cleanups</title>
<updated>2006-04-11T11:53:33+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2006-04-11T11:53:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=923f4f23940d2361e8d5c4245982163a8e9d1c91'/>
<id>923f4f23940d2361e8d5c4245982163a8e9d1c91</id>
<content type='text'>
more code cleanups after the macro conversion:

 - standardize on 'struct pipe_inode_info *pipe' variable names
 - introduce 'pipe' temporaries to reduce mass inode-&gt;i_pipe dereferencing

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
more code cleanups after the macro conversion:

 - standardize on 'struct pipe_inode_info *pipe' variable names
 - introduce 'pipe' temporaries to reduce mass inode-&gt;i_pipe dereferencing

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] get rid of the PIPE_*() macros</title>
<updated>2006-04-11T11:53:10+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2006-04-11T11:53:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9aeedfc4712ed58d9f7ae41596185c72b8dc97e8'/>
<id>9aeedfc4712ed58d9f7ae41596185c72b8dc97e8</id>
<content type='text'>
get rid of the PIPE_*() macros. Scripted transformation.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
get rid of the PIPE_*() macros. Scripted transformation.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] splice: add direct fd &lt;-&gt; fd splicing support</title>
<updated>2006-04-11T11:52:07+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-04-11T11:52:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b92ce55893745e011edae70830b8bc863be881f9'/>
<id>b92ce55893745e011edae70830b8bc863be881f9</id>
<content type='text'>
It's more efficient for sendfile() emulation. Basically we cache an
internal private pipe and just use that as the intermediate area for
pages. Direct splicing is not available from sys_splice(), it is only
meant to be used for sendfile() emulation.

Additional patch from Ingo Molnar to avoid the PIPE_BUFFERS loop at
exit for the normal fast path.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's more efficient for sendfile() emulation. Basically we cache an
internal private pipe and just use that as the intermediate area for
pages. Direct splicing is not available from sys_splice(), it is only
meant to be used for sendfile() emulation.

Additional patch from Ingo Molnar to avoid the PIPE_BUFFERS loop at
exit for the normal fast path.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
