netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org, netdev@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Alexei Starovoitov <ast@plumgrid.com>,
	Daniel Borkmann <dborkman@redhat.com>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>,
	linux-kernel@vger.kernel.org, debian-kernel@lists.debian.org
Subject: Re: [PATCH 6/6] MIPS: net: BPF: Introduce BPF ASM helpers
Date: Thu, 13 Aug 2015 22:42:46 +0200	[thread overview]
Message-ID: <20150813204246.GA24857@aurel32.net> (raw)
In-Reply-To: <1433415376-20952-7-git-send-email-markos.chandras@imgtec.com>

On 2015-06-04 11:56, Markos Chandras wrote:
> This commit introduces BPF ASM helpers for MIPS and MIPS64 kernels.
> The purpose of this patch is to twofold:
> 
> 1) We are now able to handle negative offsets instead of either
> falling back to the interpreter or to simply not do anything and
> bail out.
> 
> 2) Optimize reads from the packet header instead of calling the C
> helpers
> 
> Because of this patch, we are now able to get rid of quite a bit of
> code in the JIT generation process by using MIPS optimized assembly
> code. The new assembly code makes the test_bpf testsuite happy with
> all 60 test passing successfully compared to the previous
> implementation where 2 tests were failing.
> Doing some basic analysis in the results between the old
> implementation and the new one we can obtain the following
> summary running current mainline on an ER8 board (+/- 30us delta is
> ignored to prevent noise from kernel scheduling or IRQ latencies):
> 
> Summary: 22 tests are faster, 7 are slower and 47 saw no improvement
> 
> with the most notable improvement being the tcpdump tests. The 7 tests
> that seem to be a bit slower is because they all follow the slow path
> (bpf_internal_load_pointer_neg_helper) which is meant to be slow so
> that's not a problem.
> 
> Cc: netdev@vger.kernel.org
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Alexei Starovoitov <ast@plumgrid.com>
> Cc: Daniel Borkmann <dborkman@redhat.com>
> Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
> ---
> I have uploaded the script and the bpf result files in my LMO webspace
> in case you want to have a look. I didn't paste them in here because they
> are nearly 200 lines. Simply download all 3 files and run './bpf_analysis.py'

This patch relies on R2 instructions, and thus the Linux kernel fails to
build when targetting non-R2 CPUs. See for example:

https://buildd.debian.org/status/fetch.php?pkg=linux&arch=mipsel&ver=4.2%7Erc6-1%7Eexp1&stamp=1439480000

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

  reply	other threads:[~2015-08-13 20:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04 10:56 [PATCH 0/6] MIPS/BPF fixes for 4.3 Markos Chandras
2015-06-04 10:56 ` [PATCH 1/6] MIPS: net: BPF: Free up some callee-saved registers Markos Chandras
2015-06-04 10:56 ` [PATCH 2/6] MIPS: net: BPF: Replace RSIZE with SZREG Markos Chandras
2015-06-04 10:56 ` [PATCH 3/6] MIPS: net: BPF: Fix stack pointer allocation Markos Chandras
2015-06-04 10:56 ` [PATCH 4/6] MIPS: net: BPF: Move register definition to the BPF header Markos Chandras
2015-06-04 10:56 ` [PATCH 5/6] MIPS: net: BPF: Use BPF register names to describe the ABI Markos Chandras
2015-06-04 10:56 ` [PATCH 6/6] MIPS: net: BPF: Introduce BPF ASM helpers Markos Chandras
2015-08-13 20:42   ` Aurelien Jarno [this message]
2015-08-14  7:59     ` Markos Chandras
2015-06-04 16:49 ` [PATCH 0/6] MIPS/BPF fixes for 4.3 Alexei Starovoitov
2015-06-05  8:26   ` Markos Chandras
2015-06-04 18:40 ` David Miller
2015-06-05  8:24   ` Markos Chandras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150813204246.GA24857@aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=ast@plumgrid.com \
    --cc=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=debian-kernel@lists.debian.org \
    --cc=hannes@stressinduktion.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=markos.chandras@imgtec.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).