From owner-freebsd-net@freebsd.org Fri Feb 21 04:28:18 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 3353B250C6E for ; Fri, 21 Feb 2020 04:28:18 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Nz3N3p83z45my; Fri, 21 Feb 2020 04:28:16 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pf1-x443.google.com with SMTP id i6so543769pfc.1; Thu, 20 Feb 2020 20:28:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=24rTIeeUzuaG1ZPLLj7oH+m/AfAGQLUwTTy4okFVK4I=; b=UHQ3wFLzX4gkEJnHShqTAaLUC+gMbCC9zxxXqkUahnalkdcPxAXnlG+35e/J+6Fsh7 a3GGV5/E/4PSGb82Aco58ElfnVylvi5RVuoCZCGGhYZgyEv/k/WbASCAL9N22GlDTJVh H4xysaSu8toqAM9Zh+QT8wg8UpXsHdnCDElGY6kF+bleO7yKRPXIGVZRNdjcdu4I3Ujf xvc6lh1GrOx9AxDyhgE/hhbk4s1+hpZTa7XuX/b9HaTp6bnSI6uU870J1uvOtwHBtu7L J2h0oEQarHjM3aQ9s8df+wectXV+kI49gj8/Zcg7zNgZfYO0pPQU/BgZLvVoBV7bqITl CM9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=24rTIeeUzuaG1ZPLLj7oH+m/AfAGQLUwTTy4okFVK4I=; b=VBrzJF6YhydDVwQYA7JXFMVPsqL6m68dH6vd4wA6plwkso7q9tU0mimwyhmXxxGjL1 aB52Cm/cf07l1pMVYI4boipG78d7snF+YB4P/EQjv4JZsWeCn7lQLH7820fXW/bVzkvZ Lqr4zjgPSRwVlfnE3KFpzjRpI7UxSJpFXDbh0SXBaHqpAeRngSFKLg1rN8x9NbF5F9Dy z8NSuEospVQ7YuQJgnaBpuBjy6hNuZtBt07ME1HDNcLPZhcRoDOOAW/o1mDqF+b5+CsV 5aCby0vEYNLC+yKLQlS2tdKtyRyXSCnNZu3HbYLyddCAQH6B3dhV6hmzVVNPo1U0Ty0w A2Hw== X-Gm-Message-State: APjAAAXaE8FsuvsSMXDLGMcLiFSqxoyTzC8qvLFtWfsrRdAa/kr0/Vws hHQXDGW2FhAKZ/kATkH+LgIapo6/ X-Google-Smtp-Source: APXvYqwKzvPXK6W3N8e2UmQ2Tm0/jI+ZC/2D3a93htxgMnSI9FuyWJekJCzc4BgKpc1llTmy+OtHiQ== X-Received: by 2002:a65:4305:: with SMTP id j5mr38104670pgq.315.1582259294667; Thu, 20 Feb 2020 20:28:14 -0800 (PST) Received: from [192.168.1.101] (180-150-68-130.b49644.syd.nbn.aussiebb.net. [180.150.68.130]) by smtp.gmail.com with ESMTPSA id r26sm811951pga.55.2020.02.20.20.28.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Feb 2020 20:28:14 -0800 (PST) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: epoch and ath(4) - what should we be doing? To: Hans Petter Selasky , Adrian Chadd , FreeBSD Net References: <4945cea9-700a-6c4f-1fcc-0447a078f33a@selasky.org> From: Kubilay Kocak Message-ID: Date: Fri, 21 Feb 2020 15:28:10 +1100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Thunderbird/74.0 MIME-Version: 1.0 In-Reply-To: <4945cea9-700a-6c4f-1fcc-0447a078f33a@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48Nz3N3p83z45my X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=UHQ3wFLz; dmarc=none; spf=pass (mx1.freebsd.org: domain of koobsfreebsd@gmail.com designates 2607:f8b0:4864:20::443 as permitted sender) smtp.mailfrom=koobsfreebsd@gmail.com X-Spamd-Result: default: False [-2.05 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[koobs@FreeBSD.org]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; FORGED_SENDER(0.30)[koobs@FreeBSD.org,koobsfreebsd@gmail.com]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_NEQ_ENVFROM(0.00)[koobs@FreeBSD.org,koobsfreebsd@gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; TAGGED_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[3.4.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.85)[ip: (-0.66), ipnet: 2607:f8b0::/32(-1.89), asn: 15169(-1.67), country: US(-0.05)]; RCVD_TLS_ALL(0.00)[] 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: Fri, 21 Feb 2020 04:28:18 -0000 On 20/02/2020 8:16 pm, Hans Petter Selasky wrote: > 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 > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" I'd be happy to collate any guidelines, documentation, resource links or otherwise handy information that will help people convert/use to epoch across the tree more effectively in the wiki under an Epoch article Just flick the content my way off list or ping me on IRC