Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jan 2020 10:46:01 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        Eric van Gyzen <eric@vangyzen.net>, davidcs@FreeBSD.org, freebsd-net@freebsd.org
Subject:   Re: Strange logic in r336438
Message-ID:  <bcc3f952-5340-063c-ce21-5ba0b474c35c@selasky.org>
In-Reply-To: <c2fed140-f8a8-8173-9d64-b8b4be274334@vangyzen.net>
References:  <c2fed140-f8a8-8173-9d64-b8b4be274334@vangyzen.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-01-17 00:31, Eric van Gyzen wrote:
> I was just reviewing r336438:
> 
> https://svnweb.freebsd.org/base?view=revision&revision=336438
> 
> In bxe_interrupt_detach(), the nested loops over sc->num_queues don't 
> look right.  We drain the taskqueues for queue 0, but then free the 
> taskqueues for queues 1-N without draining them.  Should the second loop 
> come _after_ the first loop, instead of _in_ it?
> 

Hi,

taskqueue_free() will do some kind of last minute draining, if you look 
at the implementation.

However if you want to ensure all tasks are completed, taskqueue_drain() 
before free() is preferred.

--HPS




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bcc3f952-5340-063c-ce21-5ba0b474c35c>