29 Jun 2012 10:08
Lookaside cache with high volume of objects hangs the kernel on destruction (deadlock)
PRINGLE Chris <chris.pringle <at> miranda.com>
2012-06-29 08:08:42 GMT
2012-06-29 08:08:42 GMT
Dear All,
I posted about this a little while ago but ran out of time to look at the problem; unfortunately our problem
has now resurfaced and I'm looking for some advice as to what might be going wrong.
We have a device driver that utilises lookaside caches; some of those caches are subject to a fairly high
volume of objects. During normal operation there isn't a problem, however on destruction (when we unload
the driver) the kernel hangs. I've tried this on v3.0.3 on 32 bit i686 with rt12 (9 months ago), and I've also
tried it on PowerPC kernel v3.0.34 with rt55 (this week); both exhibit the same behaviour. Without the RT
patches, everything appears to be okay; the code also appears to work on older 2.6.33 kernels (with the rt patch).
As far as I can tell, it looks like kmem_cache_free is trying to acquire a lock that it already has and the
system subsequently deadlocks; I'm no expert on the PI code and I'm not entirely sure what is wrong, but it
looks like it's the RT patches that have created the problem.
The following simplified driver reproduces the issue:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#include <linux/init.h>
#include <linux/module.h>
#include <linux/poll.h>
#include <linux/version.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/slab.h>
MODULE_DESCRIPTION("test - driver module for Development Testing");
MODULE_AUTHOR("Chris Pringle");
(Continue reading)
RSS Feed