[PATCH] blkparse: drastically reduce memory foot print
authorJens Axboe <axboe@suse.de>
Thu, 22 Sep 2005 14:43:48 +0000 (16:43 +0200)
committerJens Axboe <axboe@suse.de>
Thu, 22 Sep 2005 14:43:48 +0000 (16:43 +0200)
commit7d747d22bc84545a8da10a1d02ff12bd3120ce59
treee1b2144cd6d08d87ee780583c6929aac49aedef1
parent1f7afa7245d0ec40eb6214c198d199e157fd9f74
[PATCH] blkparse: drastically reduce memory foot print

File reads needed enough memory to hold all events from all CPUs.
This quickly grew to hundreds of megabytes. Bring down this number
by interleaving reads from the files and relying on the same
mechanism as the piped reads to syncronize them. This makes file reads
use the same path as pipes and actually removes more code than it adds.
For a 900,000 entry file, memory consumption here is down from ~110MiB
from about 1MiB to process it.
blkparse.c