From owner-freebsd-net@freebsd.org Tue Aug 8 12:01:25 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AAF9DD7CD8; Tue, 8 Aug 2017 12:01:25 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DB0E83839; Tue, 8 Aug 2017 12:01:25 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id E281C26080B; Tue, 8 Aug 2017 14:01:22 +0200 (CEST) Subject: Re: mlx4en, timer irq @100%... (11.0 stuck on high network load ???) To: Slawa Olhovchenkov Cc: jch , FreeBSD Net , FreeBSD Stable , Ben RUBSON , hiren References: <2ADA8C57-2C2D-4F97-9F0B-82D53EDDC649@gmail.com> <061cdf72-6285-8239-5380-58d9d19a1ef7@selasky.org> <92BEE83D-498F-47D5-A53C-39DCDC00A0FD@gmail.com> <5d8960d8-e1ff-8719-320f-d3ae84054714@selasky.org> <6B4A35F7-5694-4945-9575-19ADB678F9FA@gmail.com> <297a784a-3d80-b1a6-652e-a78621fe5a8b@selasky.org> <3ECCFBF1-18D9-4E33-8F39-0C366C3BB8B4@gmail.com> <20170808113352.GH18123@zxy.spb.ru> <20170808115635.GY1585@zxy.spb.ru> From: Hans Petter Selasky Message-ID: Date: Tue, 8 Aug 2017 13:59:08 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170808115635.GY1585@zxy.spb.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Aug 2017 12:01:25 -0000 On 08/08/17 13:56, Slawa Olhovchenkov wrote: > On Tue, Aug 08, 2017 at 01:49:08PM +0200, Hans Petter Selasky wrote: > >> On 08/08/17 13:33, Slawa Olhovchenkov wrote: >>> TW_RUNLOCK(V_tw_lock); >>> and >>> if (INP_INFO_TRY_WLOCK(&V_tcbinfo)) { >>> >>> `inp` can be invalidated, freed and this pointer may be invalid? >> >> If you look one line up there is a pcbref ?? > > Yes. > Can different thread take this inp and freed it? > May be timer thread? No, it cannot be freed while there is a ref. Some lines down the ref is dropped once the inp pointer is no longer needed. --HPS