From owner-svn-src-all@freebsd.org Fri Jan 24 01:34:11 2020 Return-Path: Delivered-To: svn-src-all@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 8EE3A22AB15; Fri, 24 Jan 2020 01:34:11 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (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 483hWR3GR3z4LJt; Fri, 24 Jan 2020 01:34:11 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-qk1-x72b.google.com with SMTP id c185so576416qkf.3; Thu, 23 Jan 2020 17:34:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ygv6nFwxLehrJb0PB3iMSGAyxoutrp3o/l+AvnKkiwg=; b=BWxqy2dlaRBjgHj5kCqrg4ostb1xq3ZeZAZ1mzmXKu6z1V6wocAL907+t5SeWOi1MA mckj0+3UM/KpbO/QOl3E2F7P5PtJKKEM8irFHQVk8TRkNyja44e0F9f4A/lK9r9WZoTB wSFgdmxopY2nEbZlQzNC3kyTjthvfr2SHtb+5/kTvHAb5iwDnv47LAzlOclE5o7drWeq EmplqTMPuZbKhtIpNkqnBeu5ULEFZKEuOUhcdCpv3oy3tqFo2i3CdW11le1nKb/QH12i mkTwePmjXASXS8lDgVNfwhFupn4r9p5Pl5+ZXHchDRF4KVtSWYco4TTf+grAjHx5143m jomg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ygv6nFwxLehrJb0PB3iMSGAyxoutrp3o/l+AvnKkiwg=; b=IdB+yEkZ0+3WYR76BitVzLQQJhIl55RFhx24csMBPt22k99OGIk8rOujmKCKjS7Q/i 34u/Dauh7mFaDSL7QM3KM7w9lYcjf5yfvaq2f6TjfNU9C2CqmOcZsOuThEugzE9ti7hx yg5uRCW6/YzLmXnGLACMs2YtlfNYnmxWzGyPkSPsSzNz6TwX5B8atGIgSmpTIbTfZWnB q+ljwSK2puJOOgClpQetkg/tSaRildLqxJOreIKLNeiowuSIuXQggMWLs/DBfONrau6g agsonAmDNei1ER+tHgf6nca79rSObrLwZc1EJKDs+fZp0n8IHRqdkBF5N105NHxYoXOy gtJg== X-Gm-Message-State: APjAAAVSPFxTCf8NoYQSz2gTThLicKm+XrvwONaK4WDcM2q6+luZtrT4 bBaPYlceR3OFDSE/8CQcNwJdoE04ZOVQus/zI8zp43WMld8= X-Google-Smtp-Source: APXvYqxxpj6gGzgDPXfJq5WWktxVOc2S3t9vjDXq9Jf5Y9KR0XmMrfRLSEwh83JDwwYEDd7vU6TLY1+afA6nQ6Ta8qE= X-Received: by 2002:a37:308:: with SMTP id 8mr376708qkd.98.1579829649455; Thu, 23 Jan 2020 17:34:09 -0800 (PST) MIME-Version: 1.0 References: <202001231636.00NGawrr080128@repo.freebsd.org> <20200123230546.GG1268@FreeBSD.org> <20200124012458.GI1268@FreeBSD.org> In-Reply-To: <20200124012458.GI1268@FreeBSD.org> From: Ryan Stone Date: Thu, 23 Jan 2020 20:33:58 -0500 Message-ID: Subject: Re: svn commit: r357051 - head/sys/dev/bge To: Gleb Smirnoff Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 483hWR3GR3z4LJt X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2020 01:34:11 -0000 On Thu, Jan 23, 2020 at 8:25 PM Gleb Smirnoff wrote: > Because at interrupt level we can batch multiple packets in a single epoch. > This speeds up unfiltered packet forwarding performance by 5%. > > With driver level pfil hooks I would claim even more improvement, because before > the change we needed to enter epoch twice - once for filtering, than for ether_input. > > Epoch isn't a layer, it is a synchronisation primitive, so I disagree about > statement on layering violation. Epoch is a synchronization primitive, but the net_epoch is absolutely a part of the networking layer. If we need better batching then the correct solution is to introduce a batched interface for drivers to push packets up the stack, not to mess around at the interrupt layer. Note that the only reason why this works for mlx4/mlx5 is that linuxkpi *always* requests a INTR_TYPE_NET no matter what driver is running. This means that all drm graphics driver interrupts are now running under the net_epoch: https://svnweb.freebsd.org/base/head/sys/compat/linuxkpi/common/include/linux/interrupt.h?revision=352205&view=markup#l103