From owner-freebsd-net@freebsd.org Thu Feb 20 09:16:36 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F22D25A06A for ; Thu, 20 Feb 2020 09:16:36 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48NTVW51QLz4WCp; Thu, 20 Feb 2020 09:16:35 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B7A98260164; Thu, 20 Feb 2020 10:16:33 +0100 (CET) Subject: Re: epoch and ath(4) - what should we be doing? To: Adrian Chadd , FreeBSD Net References: From: Hans Petter Selasky Message-ID: <4945cea9-700a-6c4f-1fcc-0447a078f33a@selasky.org> Date: Thu, 20 Feb 2020 10:16:19 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48NTVW51QLz4WCp X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Feb 2020 09:16:36 -0000 On 2020-02-20 02:01, Adrian Chadd wrote: > Questions: > > * are these things recursive? Yes. > * what are the rules around sleeping? I've seen some ... discussions > that were quite animated around this. Any non-sleepable lock is allowed under EPOCH(9). > * what should I be doing as an epoch tracker if I could call the > receive routine from multiple paths. I see a few drivers have a single > place where they're doing EPOCH_ENTER/EPOCH_EXIT using an epoch > tracker allocated in the interrupt handler stack, but what if I also > want to call that receive path from another function path too? Can I > just stuff an epoch_tracker on the stack and it'll DTRT ? Try: https://reviews.freebsd.org/D23674 > * .. is there some updated doc or brain dump somewhere I can read? I'd > like to go add this to a couple out of tree wifi drivers under > development so this would make that whole thing much easier. Gleb ??? --HPS