lkml.org 
[lkml]   [2009]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH][RESEND] tcp: replace hard coded GFP_KERNEL with sk_allocation
From
From: David Miller <davem@davemloft.net>
Date: Wed, 02 Sep 2009 23:10:17 -0700 (PDT)

> From: Wu Fengguang <fengguang.wu@intel.com>
> 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@ghostprotocols.net>
>> CC: David S. Miller <davem@davemloft.net>
>> CC: Herbert Xu <herbert@gondor.apana.org.au>
>> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
>
> Applied to net-next-2.6, thanks!

You obviously didn't build test this with TCP MD5 support
enabled, that fails.

I'm fixing it up, but if you're going to go through the motions
of submitting a patch multiple times, at least do a thorough
build test of the code you're changing.


\
 
 \ /
  Last update: 2009-09-03 08:35    [W:0.067 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site