Re: [PATCH 1/1] block: CFQ refcounting fix

From: Brian King (brking_at_us.ibm.com)
Date: 08/31/05

  • Next message: Holger Kiehl: "Re: Where is the performance bottleneck?"
    Date:	Wed, 31 Aug 2005 08:40:54 -0500
    To: Jens Axboe <axboe@suse.de>
    
    

    Jens Axboe wrote:
    > On Tue, Aug 30 2005, brking@us.ibm.com wrote:
    >
    >>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.
    >
    >
    > Yeah, that actually looks like a dangling reference. I assume you tested
    > this properly?

    Yes. I applied the patch, booted my system (which was crashing on bootup before
    due to out of memory errors due to the leak) ran the scan a few times and verified
    /proc/meminfo didn't continually decrease like without it, and rebooted again.
    If there is anything else you would like me to do, I would be happy to do so.

    Thanks

    Brian

    -- 
    Brian King
    eServer Storage I/O
    IBM Linux Technology Center
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Holger Kiehl: "Re: Where is the performance bottleneck?"