All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ding Tianhong <dingtianhong@huawei.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: <luto@kernel.org>, <mingo@kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	Netdev <netdev@vger.kernel.org>,
	Cong Wang <cwang@twopensource.com>
Subject: Re: [PATCH] ipv6: Fix soft lockup for ipv6 network notifier.
Date: Wed, 6 Jul 2016 16:15:10 +0800	[thread overview]
Message-ID: <577CBE0E.1050809@huawei.com> (raw)
In-Reply-To: <1467361396.11238.35.camel@edumazet-glaptop3.roam.corp.google.com>

On 2016/7/1 16:23, Eric Dumazet wrote:
> On Fri, 2016-07-01 at 16:10 +0800, Ding Tianhong wrote:
>> On 2016/7/1 15:57, Eric Dumazet wrote:
>>> On Fri, 2016-07-01 at 15:38 +0800, Ding Tianhong wrote:
>>> ...
>>>>  net/ipv6/addrconf.c | 6 ++++++
>>>>  1 file changed, 6 insertions(+)
>>>>
>>>> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
>>>> index f555f4f..e294a3d 100644
>>>> --- a/net/ipv6/addrconf.c
>>>> +++ b/net/ipv6/addrconf.c
>>>> @@ -3284,6 +3284,12 @@ restart:
>>>>  		spin_unlock_bh(&addrconf_hash_lock);
>>>>  	}
>>>>  
>>>> +	/*
>>>> +	 * It is safe here to schedule out to avoid softlocking if preempt
>>>> +	 * is disabled.
>>>> +	 */
>>>> +	cond_resched();
>>>> +
>>>>  	write_lock_bh(&idev->lock);
>>>>  
>>>>  	addrconf_del_rs_timer(idev);
>>>
>>> Seeing you apparently cooked your patch against an old kernel (which
>>> one ?) ...
>>>
>>> I tried vanilla net-next kernel, and apparently I could not trigger the
>>> softlockup you mentioned.
>>>
>>> Are you sure current kernel has a bug to begin with ?
>>>
>> have you disable the preempt? The problem will disappear if you enable the preempt voluntary or preempt.
>> CONFIG_PREEMPT_NONE=y
>> # CONFIG_PREEMPT_VOLUNTARY is not set
>> # CONFIG_PREEMPT is not set
>>
>> I test the 4.1 lts kernel and found this problem, and I didn't found any patch to fix this from linux 4.1, but I will try to test in 4.7 kernel version.
> 
> I usually do not have PREEMPT enabled in my kernels.
> 
> $ grep PREEMPT .config
> CONFIG_PREEMPT_NOTIFIERS=y
> CONFIG_PREEMPT_NONE=y
> # CONFIG_PREEMPT_VOLUNTARY is not set
> # CONFIG_PREEMPT is not set
> 
> Also the whole script is quite fast on latest kernels. I am guessing you
> are chasing an already fixed problem.
> 
> 
Hi Eric:

I had found out that the patch aaf92f(netfilter: conntrack: resched in nf_ct_iterate_cleanup) solve the problem, 
this patch add cond_sched() in the nf_ct_iterate_cleanup() which will be called in the net notifier chain every time,
and I revert this patch at kernel 4.7-rc4 , it will panic for soft lockup, so I am not sure whether our patch is need,
it looks like if I disable the CONFIG for netfilter that would register the nf_ct_iterate_cleanup as notifier, the problem still be exist.

Thanks.
Ding 






> 
> 
> .
> 

  reply	other threads:[~2016-07-06  8:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01  7:38 [PATCH] ipv6: Fix soft lockup for ipv6 network notifier Ding Tianhong
2016-07-01  7:57 ` Eric Dumazet
2016-07-01  8:10   ` Ding Tianhong
2016-07-01  8:23     ` Eric Dumazet
2016-07-06  8:15       ` Ding Tianhong [this message]
2016-07-06  8:44         ` Eric Dumazet
2016-07-07  1:42           ` Ding Tianhong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=577CBE0E.1050809@huawei.com \
    --to=dingtianhong@huawei.com \
    --cc=cwang@twopensource.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.