Re: Kernel deadlock using nbd over acenic driver

Peter T. Breuer (ptb@it.uc3m.es)
Thu, 16 May 2002 07:15:00 +0200 (MET DST)


"A month of sundays ago Steven Whitehouse wrote:"
> So something to try is this, in nbd_send_req() add the lines:
>
> if (current->flags & PF_MEMALLOC == 0) {
> current->flags |= PF_MEMALLOC;
> we_set_memalloc = 1;
> }
>
> before the first nbd_xmit() call and
>
> if (we_set_memalloc)
> current->flags &= ~PF_MEMALLOC;
>
> at the end just before the return; rememebring to declare the variable:

I don't see any reason to introduce a second flag to say when a flag
has been set .. Initial reports are that symptoms go away when

current->flags |= PF_MEMALLOC;

is set in the process about to do networking (and unset afterwards).

There will be more news later today. I believe that this will remove
deadlock against VM for tcp buffers, but I don't believe it will
stop deadlocks against "nothing", when we simply are out of buffers.
The only thing that can do that is reserved memory for the socket.
Any pointers?

Peter
-
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/