diff options
author | Brian King <brking@us.ibm.com> | 2005-09-06 15:18:04 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-07 16:57:39 -0700 |
commit | 38f18527592756d24a12e84c0713e8c902ba7f15 (patch) | |
tree | e20298522f411f1184d748206df6e15b3b949117 /arch | |
parent | 49e31cbac5be2202f351626fd4fb33ad4d4819b8 (diff) | |
download | linux-38f18527592756d24a12e84c0713e8c902ba7f15.tar.gz linux-38f18527592756d24a12e84c0713e8c902ba7f15.tar.bz2 linux-38f18527592756d24a12e84c0713e8c902ba7f15.zip |
[PATCH] block: CFQ refcounting fix
I ran across a memory leak related to the cfq scheduler. The cfq
init function increments the refcnt of the associated request_queue.
This refcount gets decremented in cfq's exit function. Since blk_cleanup_queue
only calls the elevator exit function when its refcnt goes to zero, the
request_q never gets cleaned up. It didn't look like other io schedulers were
incrementing this refcnt, so I removed the refcnt increment and it fixed the
memory leak for me.
To reproduce the problem, simply use cfq and use the scsi_host scan sysfs
attribute to scan "- - -" repeatedly on a scsi host and watch the memory
vanish.
Signed-off-by: Brian King <brking@us.ibm.com>
Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions