[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120611095115.22afbd1b@s6510.linuxnetplumber.net>
Date: Mon, 11 Jun 2012 09:51:15 -0700
From: Stephen Hemminger <shemminger@...tta.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH v2] dummy: fix rcu_sched self-detected stalls
On Mon, 11 Jun 2012 09:11:57 +0200
Eric Dumazet <eric.dumazet@...il.com> wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> Trying to "modprobe dummy numdummies=30000" triggers :
>
> INFO: rcu_sched self-detected stall on CPU { 8} (t=60000 jiffies)
>
> After this splat, RTNL is locked and reboot is needed.
>
> We must call cond_resched() to avoid this, even holding RTNL.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> ---
> drivers/net/dummy.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
> index 442d91a..bab0158 100644
> --- a/drivers/net/dummy.c
> +++ b/drivers/net/dummy.c
> @@ -187,8 +187,10 @@ static int __init dummy_init_module(void)
> rtnl_lock();
> err = __rtnl_link_register(&dummy_link_ops);
>
> - for (i = 0; i < numdummies && !err; i++)
> + for (i = 0; i < numdummies && !err; i++) {
> err = dummy_init_one();
> + cond_resched();
> + }
> if (err < 0)
> __rtnl_link_unregister(&dummy_link_ops);
> rtnl_unlock();
>
Rather than holding lock for the whole loop, why not reacquire
each time to keep from holding off everything els.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists