From patchwork Fri Nov 27 10:10:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Abeni X-Patchwork-Id: 334055 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=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, 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 EA09AC2D0E4 for ; Fri, 27 Nov 2020 10:10:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8CB8222201 for ; Fri, 27 Nov 2020 10:10:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dI618EtT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726719AbgK0KKr (ORCPT ); Fri, 27 Nov 2020 05:10:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:41156 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbgK0KKr (ORCPT ); Fri, 27 Nov 2020 05:10:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606471846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=5o1Y9jfYkIJfU2WLAw69zK9dshLpzcvcgkRyyicgbOU=; b=dI618EtTDPMjOvMaaRpI83kMPoNZ1KWa1R+JdUQomeoXFkYODfI2Em2tC2LFFL+oOHcuUr UfkzAChL9eflJFeHP27y2yJ2v0tCZgbhWZbDPvoZOmcTUONHcyfEk1ITKhyEoWCZpB7YV7 3ALniBMYAH6M0iHue12m6kSmf9EVG7k= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-504-NkSouSKJNYuAfQRppph5mw-1; Fri, 27 Nov 2020 05:10:41 -0500 X-MC-Unique: NkSouSKJNYuAfQRppph5mw-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 49207185E49A; Fri, 27 Nov 2020 10:10:40 +0000 (UTC) Received: from gerbillo.redhat.com (ovpn-113-134.ams2.redhat.com [10.36.113.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id DDD361002388; Fri, 27 Nov 2020 10:10:38 +0000 (UTC) From: Paolo Abeni To: netdev@vger.kernel.org Cc: Jakub Kicinski , mptcp@lists.01.org, Eric Dumazet Subject: [PATCH net-next 0/6] mptcp: avoid workqueue usage for data Date: Fri, 27 Nov 2020 11:10:21 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The current locking schema used to protect the MPTCP data-path requires the usage of the MPTCP workqueue to process the incoming data, depending on trylock result. The above poses scalability limits and introduces random delays in MPTCP-level acks. With this series we use a single spinlock to protect the MPTCP data-path, removing the need for workqueue and delayed ack usage. This additionally reduces the number of atomic operations required per packet and cleans-up considerably the poll/wake-up code. Paolo Abeni (6): mptcp: open code mptcp variant for lock_sock mptcp: implement wmem reservation mptcp: protect the rx path with the msk socket spinlock mptcp: allocate TX skbs in msk context mptcp: avoid a few atomic ops in the rx path mptcp: use mptcp release_cb for delayed tasks include/net/sock.h | 1 + net/core/sock.c | 2 +- net/mptcp/mptcp_diag.c | 2 +- net/mptcp/options.c | 47 +-- net/mptcp/protocol.c | 733 ++++++++++++++++++++++++++++++----------- net/mptcp/protocol.h | 34 +- net/mptcp/subflow.c | 14 +- 7 files changed, 598 insertions(+), 235 deletions(-) Reviewed-by: Mat Martineau Reviewed-by: Mat Martineau Reviewed-by: Mat Martineau