summaryrefslogtreecommitdiff
path: root/include/linux/seq_file.h
AgeCommit message (Collapse)Author
2005-03-07[PATCH] Speed up /proc/pid/mapsPrasanna Meda
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 <pmeda@akamai.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-04-12[PATCH] uninline seq_puts() and seq_putc()Andrew Morton
Saves 3.4k from my vmlinux. Thanks to Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua> for performing the analysis.
2003-09-08[PATCH] Add SEQ_START_TOKEN #define to seq_file.hJoe Perches
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.
2003-05-20[PATCH] seq_path(), /proc/mounts and /proc/swapsAlexander Viro
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.
2003-05-11Add user pointer annotations.Linus Torvalds
2003-05-05[FS]: Add seq_release_private and proc_net_fops_create helpers.Steven Whitehouse
2002-05-21[PATCH] new helpers for /procAlexander Viro
new helpers for seq_file - for cases where we don't have a non-trivial iterator and just want to use seq_{printf,putc,...}.
2002-04-07[PATCH] missing includes in seq_file.hAnton Blanchard
include/linux/seq_file.h uses memcpy and struct semaphore and so should include the relevant files.
2002-02-04v2.5.0.2 -> v2.5.0.3Linus Torvalds
- 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
2002-02-04v2.4.14.2 -> v2.4.14.3Linus Torvalds
- Alan Cox: more driver merging - Al Viro: make ext2 group allocation more readable