lkml.org 
[lkml]   [2012]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 01/12] netvm: Prevent a stream-specific deadlock
From
Date
On Tue, 2012-05-15 at 10:14 +0100, Mel Gorman wrote:
> @@ -289,6 +289,18 @@ void sk_clear_memalloc(struct sock *sk)
> sock_reset_flag(sk, SOCK_MEMALLOC);
> sk->sk_allocation &= ~__GFP_MEMALLOC;
> static_key_slow_dec(&memalloc_socks);
> +
> + /*
> + * SOCK_MEMALLOC is allowed to ignore rmem limits to ensure forward
> + * progress of swapping. However, if SOCK_MEMALLOC is cleared while
> + * it has rmem allocations there is a risk that the user of the
> + * socket cannot make forward progress due to exceeding the rmem
> + * limits. By rights, sk_clear_memalloc() should only be called
> + * on sockets being torn down but warn and reset the accounting if
> + * that assumption breaks.
> + */
> + if (WARN_ON(sk->sk_forward_alloc))

WARN_ON_ONCE() perhaps?

> + sk_mem_reclaim(sk);
> }


\
 
 \ /
  Last update: 2012-05-15 12:21    [W:0.077 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site