Re: [patch] my latest oom stuff - another thing.

Andi Kleen (ak@muc.de)
Mon, 26 Oct 1998 02:52:23 +0100


On Mon, Oct 26, 1998 at 02:23:39AM +0100, David S. Miller wrote:
> How about extending the standard socket timer (ipv4/timer.c) for this ?
> It would just need a new timer type "TIME_RETRY" and a protocol entry
> point to call in this case. Then when the initial FIN allocation fails
> just start a timer for 1s (like e.g. the retransmit handler does when he
> gets an locked socket).
>
> Which wait queue should the socket owning process sleep on, any
> suggestions?

I think the ordinary sk->sleep queue is ok. In case other waiters are
waked too they will just see the sk->shutdown & SEND_SHUT.. flag earlier,
and if the wake up is triggered by other code it is likely that new memory
is available then. Or do I miss something? :)

Of course the timer shouldn't last longer than the linger time - 2*time
of first sock_wmalloc() [as an heuristic]

-Andi

P.S.: I looked over the lock_socks and didn't find anything obvious that
could explain SMP freezes.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/