JFFS2 oops when writing to two partitions simultaneously
Orjan Friberg
of at flatfrog.com
Thu Jan 26 11:05:15 EST 2012
On 01/26/2012 04:25 PM, Orjan Friberg wrote:
> On 01/26/2012 04:17 PM, Joakim Tjernlund wrote:
>> You could try removing the lock dropping, one at a time, to see if it makes a difference.
>> That would be a data point for anyone wanting to fix this.
>
> I'll turn on CONFIG_DEBUG_SPINLOCK and CONFIG_DEBUG_SPINLOCK_SLEEP and
> see what happens.
As expected, dropping the lock around kmalloc was fine once I changed
GFP_KERNEL to GFP_ATOMIC.
Dropping the lock around kfree worked fine (I didn't think it would).
And, as you suggested, we could probably combine those.
We must hold the lock when calling this->compress (to protect compr_buf;
we oops without it) but in doing so I get
BUG: sleeping function called from invalid context at kernel/mutex.c:85
because jffs2_lzo_compress does a mutex_lock.
Even if it did work, I think we'd unneccessarily be limiting the
throughput in that piece of code by holding the lock for that long.
--
Orjan Friberg
FlatFrog Laboratories AB
More information about the linux-mtd
mailing list