From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0403CC43381 for ; Thu, 21 Mar 2019 10:14:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D155D218AE for ; Thu, 21 Mar 2019 10:14:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728064AbfCUKOu (ORCPT ); Thu, 21 Mar 2019 06:14:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53416 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727903AbfCUKOu (ORCPT ); Thu, 21 Mar 2019 06:14:50 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 087C7307D90F; Thu, 21 Mar 2019 10:14:50 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.32.181.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD8EB1001E88; Thu, 21 Mar 2019 10:14:48 +0000 (UTC) From: Paolo Abeni To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , John Fastabend , Ivan Vecera Subject: [PATCH net-next 0/2] net: dev: BYPASS for lockless qdisc Date: Thu, 21 Mar 2019 11:14:17 +0100 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 21 Mar 2019 10:14:50 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch series is aimed at improving xmit performances of lockless qdisc in the uncontended scenario. After the lockless refactor pfifo_fast can't leverage the BYPASS optimization. Due to retpolines the overhead for the avoidables enqueue and dequeue operations has increased and we see measurable regressions. The first patch introduces and maintains an additional flag inside the qdisc struct, tracking the queue status (empty/not empty) and the second patch uses such info to implement the BYPASS code path for lockless qdisc. Overall this avoids up to 2 indirect calls per xmit packet when the packet rate is below line rate. Detailed performance figures are reported in the 2nd patch. Paolo Abeni (2): net: sched: add empty status flag for NOLOCK qdisc net: dev: introduce support for sch BYPASS for lockless qdisc include/net/sch_generic.h | 17 +++++++++++++++++ net/core/dev.c | 9 +++++++++ net/sched/sch_generic.c | 2 ++ 3 files changed, 28 insertions(+) -- 2.20.1