From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.54 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795963402; b=AnmFsv8OCGgEgD6izxdkcea3kcCkr7jx91ub+a7oBdHNG3n5ictz+UP4H2xCxKuHWhx8 DgRdMZu8Drderv8ycUoXvzNZ7Fg5Wbk1gWznuQZwGbKJbzxYjQeP3l+3PkSckbYEmDHkH m/dIf3vflZoHH8a+1zZPXw2CF+BCR6TAj5JgaI82Oc8tT0Ah+IU5et+mt88M8ESxiUPqq isgDvTIFzRH8OmSkZqGJVwL+oSKyMPAgtainsIT0AjJwKLKnkYqPsDUyTOURSwJh91hdu xmD5nXJzdE+iE6MT1yyvvZJhUuqn/KslozRDf3PuDwYh+0qDnNO3qjNvzmRKhFALg5A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795963402; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=PCs1nEWfvKWbL6FxjWGTLOUDoACFVo9HH7kzk6QNnU8=; b=vCL7Hi001HW4B439o3BNSifKPryoeSjUkImTDwLT9LT65YmTuYU480oS4FCNAZm1fxFM JGUz3GJjIDnRK7lTWylXRKSp+G7BYytCFHZTZ8s2mUo2/I/DauAjMTZYyf4vObC6myqyZ KBbCF8bFNmnw++1Yk/pE03kCIwdtxxEdU9UXI0vY2eHch6Ya+3SI2EabnhD1Ugmnr9X/b w/b12fWCTOjGung29zjOHaz6spLIC7oGx0oXSfafsyJdJZNLh3LcbFy+gSNMY1lKK0rJc KJUanD6pF9ofLkXbpWzDbvkfY9/yDui9ibJ1+JooutDJDDsYjAmZGokPTtkUl391WyQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bairaktaris.de; spf=pass smtp.mailfrom=bairaktaris.de; dkim=pass header.d=bairaktaris.de header.i=@bairaktaris.de header.a=rsa-sha256 header.s=google header.b=AOnkGgA3; arc=none smtp.remote-ip=209.85.218.54 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F1A5606A323 for ; Sun, 29 Nov 2026 14:43:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7F1A5606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.a=rsa-sha256 header.s=google header.b=AOnkGgA3 Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-c516a1623d0so1148051466b.2 for ; Sun, 29 Nov 2026 06:43:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bairaktaris.de; s=google; t=1795963401; x=1796568201; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=PCs1nEWfvKWbL6FxjWGTLOUDoACFVo9HH7kzk6QNnU8=; b=AOnkGgA3E81JwC0p8G2YosScCnekoGMF/ikgNlX0Yf35wmu+4mCFp5YDR+Kv+hypWL jRT8kR/wzl17g+qG+5DSznEbU0kBI0Ef5bJ3JQDmvOckZSZRPB5NLtisnlWXov5JUw7l Ccxnp/ytCF9O7dvRElu6S1A9RKrJfisjQbVQBTz5hE5sK1tkf131T4zyOvbX2x/t+FW6 b79kRHxRitEBO+0b5MltZBOg5CMv3N3Yupj5o3L0I8PFlzrzTVa4poi2JEmIWMt/maXf oZqzqMUQFnKFkXG7vfNvwLWrAZZPHK2ulsizvvr2nJrB+q+Im9Tzhxc/H5iYBn3ja1Jd 5FyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795963401; x=1796568201; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=PCs1nEWfvKWbL6FxjWGTLOUDoACFVo9HH7kzk6QNnU8=; b=wUB+CwwDU+4MJaa8txR5gU9yezeBxA0C63V2GJvhxJXAmUNZ7SzFfKawysHuAtBdPn P5mWRl17yxRy8uOkROlI94VufUBnNT2zlgnVgjy3zQMETahGdxb94MW1WZ42uopKPsKZ KbVfIw5YfwuaqM0Q58srqkHxSElE1NrDZDqiJXdtdFph7puNzIQv07T/keLekWJiwG81 GlPdJvQkaSQ2s6Yy6n4AM4E3NznYmll6ZXUEjqXat+tttE6XWJYyqK55uYawVk/2uuEG sNX63JM3hZnRY/9IERwe5uoYcC6L6rAJtudVQOHwELnbgKpMXl4Pz8VP6M+35OolT/r+ BipQ== X-Forwarded-Encrypted: i=1; AL+hErEwHmK44zsG7R0IgFD7++p6bPgxfvcskOa8+lZw8gcIzFwPj6U/pIMYo8PAOGaBhbp5By8FSfJTTunM6w8=@vger.kernel.org X-Gm-Message-State: APuU4Z/2ip10Iue7r8ZvP6pxu+EGrFM5CV/xS5nM5clrqTZQWPDmcG7M haysSlVXot3bpAabFJ0l9IbfyIa6RWMQ9P65e/ooktM+feFt3euHkClLmiQcjjhZWQ== X-Gm-Gg: AZFdTZfmKuKL8p/0nOUgAbd6qL3BEVBtsk+JHRnVu3BHUx6Pc7MxvBj9Ex0nUSqUUi0 wSlN0F8y4LM3wDwRl6qhBp2GKxogqnguWEfaV+dc/Hy7rNPvJ6OJEXocx1OhHaFvRFa9QtIpRqt VjRAG1HSkuJZUj9RSKVmLrGgfk2noEaKmq/4j2qFnUo3pMieomyuJUPlv9RI/33eDjfSyH+Bs2j vaBYNcowDu2Wyr48iix/1V/B1b+po7MFVHcTLNZnKFUb/9vJiySknfXn0w8vYHHoaydBJxvjYeY TpZYQfrsc6llCMUAtUZtm62J33+hHr1OMDhQGKK3Z4CAkSD07mmZ1ubkhrqem50yYi0sGiHer1r sXFrPooRstkg4r81XR2jIThkSPSYS1DH3uTBtUtU2D+lKdeIMH4ob+Zn7Y4vOmf8juBbxP5iD2I qHzBImUhSH1JhATX4PaNWIhC7vVuJwtC7efYuchjFQJUYXT7uWUjJdxVUjcXh68Ry1/pHtjPKwt M/r2C4khTrp4QdoJVtzOcPLFRl2Q3XHQZ4R/eOyDhn7qJClSJCMHx9ZxZVqoNsHIl3AcylekjyU /G8crAVtwe/90cn7iwpxfzKP06o0VY4UYAO2RfaT9qLNRyCxShRh3LmhA0L9ertknPfgpeaikVs exPVWoDys5WCSfmXN8RzAecN8NPLgAvJtrHOxCJXVkXRO+5M2m/ntL0Tg8Y41XWPBa6j2so7Xzx o77pzougy1UGAzeg2Ql9zt1hsH5FX9ovYlubkzdeTlD31Lni8U5u1qx6ka2dU9539eLBlPbZ80r AZNp06wqcA+Cx86827GRYBfrPIjCYH6khYCLXU3Y1L9EOwEbx6atSj9uoYl5S8NtGGqjUGd6bpK BGDHWse6dttV X-Received: by 2002:a17:907:d02:b0:c51:558c:7654 with SMTP id a640c23a62f3a-c51558cefc9mr2417738766b.7.1795963400857; Sun, 29 Nov 2026 06:43:20 -0800 (PST) Received: from Desktop.tail070c67.ts.net ([217.26.234.239]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c513ae8db37sm1057883266b.35.2026.11.29.06.43.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 06:43:20 -0800 (PST) From: Julius Bairaktaris To: Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Willem de Bruijn , Simon Horman , Shuah Khan , Qingfang Deng , Guillaume Nault , Sebastian Andrzej Siewior , Haoli Zhang <26031212468@stu.xidian.edu.cn>, linux-ppp@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH net-next 0/3] ppp: transmit data frames without the unit and channel locks Date: Sun, 29 Nov 2026 15:43:16 +0100 Message-ID: <20261129144319.1489366-1-julius@bairaktaris.de> X-Mailer: git-send-email 2.53.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Every data frame sent on a PPP unit takes ppp->wlock in ppp_xmit_process() and the channel's downl in ppp_push(), so CPUs that send on one unit at the same time go through the channel and the lower device one frame at a time. On a router that shapes its upload with cake_mq on an ifb in front of a PPPoE device, the CAKE instance of each CPU dequeues into that one ppp device. Patch 1 sends a data frame straight to the channel when none of the work done under those locks applies, for a channel that opts in with a new lockless_xmit flag. Patch 2 sets the flag for PPPoE. Patch 3 adds a selftest that sends from every CPU at once and compares the PPP and Ethernet counters. Measured on the bench: on a Xiaomi AX3600 (IPQ8074, four Cortex-A53) uploading over PPPoE with 8 TCP streams, shaped to 160 Mbit/s by cake_mq on ifb4pppoe-wan, the router's CPU time fell from 24.2 % to 21.0 % of 400 % with patches 1 and 2 on its 6.18 kernel (three interleaved pairs of 60 s runs, 23.8-24.8 % against 18.9-22.6 %), at the same goodput of 149.6 to 150.0 Mbit/s and the same latency under load. Patch 1 relies on ppp_unregister_channel() clearing pch->chan only after ppp_disconnect_channel() has removed the channel from ppp->channels and waited for a grace period. A PPPIOCDISCONN running at the same time lets the unregister skip that wait today; "ppp: serialize channel operations with unregister" closes that window: https://lore.kernel.org/netdev/20261119084333.371234-1-26031212468@stu.xidian.edu.cn/ In a 4-CPU KVM guest, pppoe.sh and ppp_async.sh pass in five runs on a KASAN and lockdep kernel with the series, and two rounds of stopping the client pppd while one TCP and one UDP sender per CPU transmit, then reconnecting, end without a report. I used Claude (Anthropic) to help write these patches. Julius Bairaktaris (3): ppp: transmit data frames without the unit and channel locks pppoe: transmit without the PPP channel lock selftests: net: ppp: send on PPPoE from every CPU at once drivers/net/ppp/ppp_generic.c | 85 ++++++++++++++++++++++-- drivers/net/ppp/pppoe.c | 7 +- include/linux/ppp_channel.h | 1 + tools/testing/selftests/net/ppp/config | 4 ++ tools/testing/selftests/net/ppp/pppoe.sh | 83 +++++++++++++++++++++++ 5 files changed, 170 insertions(+), 10 deletions(-) base-commit: f89726ffabef1b08c52e6163b7ab94b0d5f15503 -- 2.53.0