Re: [PATCH][RESEND] tcp: replace hard coded GFP_KERNEL with sk_allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Wu Fengguang <fengguang.wu@xxxxxxxxx>
Date: Thu, 3 Sep 2009 12:04:07 +0800

> This fixed a lockdep warning which appeared when doing stress
> memory tests over NFS:
> 
> 	inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage.
> 
> 	page reclaim => nfs_writepage => tcp_sendmsg => lock sk_lock
> 
> 	mount_root => nfs_root_data => tcp_close => lock sk_lock =>
> 			tcp_send_fin => alloc_skb_fclone => page reclaim
> 
> David raised a concern that if the allocation fails in tcp_send_fin(), and it's
> GFP_ATOMIC, we are going to yield() (which sleeps) and loop endlessly waiting
> for the allocation to succeed.
> 
> But fact is, the original GFP_KERNEL also sleeps. GFP_ATOMIC+yield() looks
> weird, but it is no worse the implicit sleep inside GFP_KERNEL. Both could
> loop endlessly under memory pressure.
> 
> CC: Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxxxxxxx>
> CC: David S. Miller <davem@xxxxxxxxxxxxx>
> CC: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx>

Applied to net-next-2.6, thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux