<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/seq_file.h, branch stable/2.6.16.y</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=stable%2F2.6.16.y</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=stable%2F2.6.16.y'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2005-03-08T02:15:24Z</updated>
<entry>
<title>[PATCH] Speed up /proc/pid/maps</title>
<updated>2005-03-08T02:15:24Z</updated>
<author>
<name>Prasanna Meda</name>
<email>pmeda@akamai.com</email>
</author>
<published>2005-03-08T02:15:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d6b7a781c51c91dd054e5c437885205592faac21'/>
<id>urn:sha1:d6b7a781c51c91dd054e5c437885205592faac21</id>
<content type='text'>
This patch uses find_vma() to improve the read response of /proc/pid/maps. 
It attempts to make the liner scan instead of quadratic walk and utilise rb
tree.  Reading the file was doing sequential scan from the begining to file
position all the time, and taking a quite long time.

The improvements came from f_version/m_version and resulting in mmap_cache
match.  Even if mmap_cache does not match, rb tree walk should be faster
than sequential walk.  First attempt was to put the state across read
system calls into private data.  Later got inspiration from wli's pid patch
using f_version in readdir of /proc.  Other advantage is, f_version will be
cleared automatically by lseek.

The test program creates 32K maps and splits them into two(limited by
max_map_count sysctl) using mprotect(0).  After the patch, the read time
improves from many seconds to milliseconds, and does not grow superlinearly
with number of read calls.

Help taken from Peter Swain in idea and testing.

After the patch:
Reading /proc/self/maps:65528 time: 0 secs and   780728 usecs buf:4096 bytes:3811362
Reading /proc/self/maps:65528 time: 1 secs and   117573 usecs buf:1024 bytes:3866627
Reading /proc/self/maps:65528 time: 0 secs and   473459 usecs buf: 256 bytes:3866627
Reading /proc/self/maps:65528 time: 0 secs and   901288 usecs buf:  64 bytes:3866627
Reading /proc/self/maps:65528 time: 1 secs and   480185 usecs buf:  16 bytes:3866627
Reading /proc/self/maps:65528 time: 1 secs and   636268 usecs buf:   4 bytes:3866627
Reading /proc/self/maps:65528 time: 4 secs and   118327 usecs buf:   1 bytes:3866627

Before the patch:
Reading /proc/self/maps:65528 time: 4 secs and   359556 usecs buf:4096 bytes:3866647
Reading /proc/self/maps:65528 time:16 secs and   218584 usecs buf:1024 bytes:3866688
Reading /proc/self/maps:65528 time:67 secs and   870200 usecs buf: 256 bytes:3866688
Reading /proc/self/maps:65528 time:255 secs and   186934 usecs buf:  64 bytes:3866688
Small reads never completed.

Signed-off-by: Prasanna Meda &lt;pmeda@akamai.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] uninline seq_puts() and seq_putc()</title>
<updated>2004-04-13T02:23:16Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2004-04-13T02:23:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=af86cdc67311004c81894ac69e981abfd2d65a90'/>
<id>urn:sha1:af86cdc67311004c81894ac69e981abfd2d65a90</id>
<content type='text'>
Saves 3.4k from my vmlinux.

Thanks to Denis Vlasenko &lt;vda@port.imtp.ilyichevsk.odessa.ua&gt; for performing
the analysis.
</content>
</entry>
<entry>
<title>[PATCH] Add SEQ_START_TOKEN #define to seq_file.h</title>
<updated>2003-09-09T03:04:57Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2003-09-09T03:04:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=26fdde3addfc91036086003d1be9678ba33ab7ad'/>
<id>urn:sha1:26fdde3addfc91036086003d1be9678ba33ab7ad</id>
<content type='text'>
Code that includes seq_file.h uses a magic pointer "(void*)1"
to start a header seq_printf.

This patch adds a #define, so that people can start writing more
readable code.
</content>
</entry>
<entry>
<title>[PATCH] seq_path(), /proc/mounts and /proc/swaps</title>
<updated>2003-05-20T13:58:17Z</updated>
<author>
<name>Alexander Viro</name>
<email>viro@parcelfarce.linux.theplanet.co.uk</email>
</author>
<published>2003-05-20T13:58:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=32ccd2b61dfd05401528b27770ab3cd22b143641'/>
<id>urn:sha1:32ccd2b61dfd05401528b27770ab3cd22b143641</id>
<content type='text'>
This adds a new seq_...() helper:

   seq_path(seq_file, mnt, dentry, escape)

It spits the pathname into seq_file, does octal escapes for given set of
characters, returns the number of characters it'd produced or -1 in case
of error.  Long names are handled gracefully - you don't need anything
to do, generic seq_file logics will do the right thing.

/proc/mounts and /proc/swaps are converted to use of seq_path(), some
junk removed.

/proc/pid/maps will be converted next.
</content>
</entry>
<entry>
<title>Add user pointer annotations.</title>
<updated>2003-05-12T04:10:13Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@penguin.transmeta.com</email>
</author>
<published>2003-05-12T04:10:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5a3ff5c474b5b1262092c08b8610635c8c7d9f8f'/>
<id>urn:sha1:5a3ff5c474b5b1262092c08b8610635c8c7d9f8f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[FS]: Add seq_release_private and proc_net_fops_create helpers.</title>
<updated>2003-05-05T17:52:42Z</updated>
<author>
<name>Steven Whitehouse</name>
<email>steve@gw.chygwyn.com</email>
</author>
<published>2003-05-05T17:52:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=acec7ca3b8b69a234f1b179411d9bc1fb3b16b3c'/>
<id>urn:sha1:acec7ca3b8b69a234f1b179411d9bc1fb3b16b3c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[PATCH] new helpers for /proc</title>
<updated>2002-05-22T04:13:05Z</updated>
<author>
<name>Alexander Viro</name>
<email>viro@math.psu.edu</email>
</author>
<published>2002-05-22T04:13:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ec3a47e78a7ecfe1172bac081c2e27cec34967da'/>
<id>urn:sha1:ec3a47e78a7ecfe1172bac081c2e27cec34967da</id>
<content type='text'>
new helpers for seq_file - for cases where we don't have a non-trivial
iterator and just want to use seq_{printf,putc,...}.
</content>
</entry>
<entry>
<title>[PATCH] missing includes in seq_file.h</title>
<updated>2002-04-08T04:30:39Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2002-04-08T04:30:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9523cdad092834cb7cca988f6a675df27fc39d34'/>
<id>urn:sha1:9523cdad092834cb7cca988f6a675df27fc39d34</id>
<content type='text'>
include/linux/seq_file.h uses memcpy and struct semaphore and so should
include the relevant files.
</content>
</entry>
<entry>
<title>v2.5.0.2 -&gt; v2.5.0.3</title>
<updated>2002-02-05T07:58:11Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@athlon.transmeta.com</email>
</author>
<published>2002-02-05T07:58:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4d6c7b36fcb5b4d3a727a9d84353422bacd173a3'/>
<id>urn:sha1:4d6c7b36fcb5b4d3a727a9d84353422bacd173a3</id>
<content type='text'>
- Al Viro: more superblock cleanups
- Jens Axboe: more patches for new block IO layer
- Christoph Hellwig: get rid of the old, long- deprecated SCSI error
handling
</content>
</entry>
<entry>
<title>v2.4.14.2 -&gt; v2.4.14.3</title>
<updated>2002-02-05T04:33:15Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@athlon.transmeta.com</email>
</author>
<published>2002-02-05T04:33:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d40d1af9f0aebf7e108f1dfb66ac5af671bc9719'/>
<id>urn:sha1:d40d1af9f0aebf7e108f1dfb66ac5af671bc9719</id>
<content type='text'>
  - Alan Cox: more driver merging
  - Al Viro: make ext2 group allocation more readable
</content>
</entry>
</feed>
