Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2012 17:08:49 +0400
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        Ryan Stone <rysto32@gmail.com>
Cc:        Jack Vogel <jfvogel@gmail.com>, net@freebsd.org
Subject:   Re: ixgbe & if_igb RX ring locking
Message-ID:  <509122E1.3020408@FreeBSD.org>
In-Reply-To: <CAFMmRNxNMBAZ1fPKox4Y4rJhhh0AjSXwxCvrVbG89sOyohd7zQ@mail.gmail.com>
References:  <5079A9A1.4070403@FreeBSD.org> <20121015162926.GV89655@FreeBSD.org> <CAFMmRNxT=GWxc6r7B81ENjzwJmfea3016Sh-DxJEGBwybM0QwQ@mail.gmail.com> <507D4F11.2030704@FreeBSD.org> <CAFMmRNy1h86ZXAH4oK%2BLOK6_VeTsbo=d6oYk669bisKfHbJ56A@mail.gmail.com> <20121016124733.GC89655@glebius.int.ru> <CAFMmRNzA23r_a0nrnsUN8ZoHGL5c7OF1-nCqWpN42FLc50d7eg@mail.gmail.com> <50843D39.5000003@FreeBSD.org> <CAFMmRNxNMBAZ1fPKox4Y4rJhhh0AjSXwxCvrVbG89sOyohd7zQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 22.10.2012 05:43, Ryan Stone wrote:
> On Sun, Oct 21, 2012 at 2:21 PM, Alexander V. Chernikov
> <melifaro@freebsd.org> wrote:
>>> ix:rx ->  udp is also fairly obvious (here's one backtrace):
>> The same question, where "udp" -> "ix:rx" can happen ?
>
> It can't happen directly as far as I can tell.  But to trigger a
> deadlock, "all" that has to happen is that a thread holds each mutex
> in the cycle while trying to acquire the next mutex in the cycle.  I
Sorry, which mutex ? What cycle?

> realize that in this case that requires five separate threads to all
5?
> lose a race simultaneously, but it's still theoretically possible and
> needs to be avoided.
Can you please be more explicit?

Once again, initial point of discussion was: do we _really_ need to 
unlock rx ring before calling if_input?

It has been said that there are some complicated cases, where something 
bad can happen so we still need to call unlock.

That's OK and we probably should try to fix such cases generally in 
networking stack if we can (maybe by saying explicitly that, say, ioctl 
calls are forbidden in ithreads).

However, it is still unclear (at least to me) how both LORs can really 
happen in current code (especially given modified ixgbe driver in your 
traces).



> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>


-- 
WBR, Alexander





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?509122E1.3020408>