On Tue, 18 Jul 2000, Neil Brown wrote: > > I managed to reproduce this and, at least for me, it is caused by a > deadlock when kflushd tries to write out data via raid1, raid1 tries > to allocate memory, which blocks waiting for kflushd to free up some > memory. Hmm.. This is actually what "GFP_BUFFER" was meant for: GFP_BUFFER is not atomic, but it will not block for IO. So for example, GFP_BUFFER can still walk the page tables and the LRU lists (because it's not called from an interrupt context), but it will drop only pages that don't need IO to be dropped. That is, of course, unless GFP_BUFFER has had bit-rot. It's simple enough that I don't think it has, and I'd love to hear if your deadlock goes away using GFP_BUFFER instead of GFP_ATOMIC, which would be the right thing to do.. Linus