Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EE77C6379F for ; Fri, 17 Feb 2023 12:58:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230034AbjBQM6W (ORCPT ); Fri, 17 Feb 2023 07:58:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230043AbjBQM5x (ORCPT ); Fri, 17 Feb 2023 07:57:53 -0500 Received: from mail-vk1-xa2b.google.com (mail-vk1-xa2b.google.com [IPv6:2607:f8b0:4864:20::a2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7B396A066 for ; Fri, 17 Feb 2023 04:57:45 -0800 (PST) Received: by mail-vk1-xa2b.google.com with SMTP id by12so417173vkb.3 for ; Fri, 17 Feb 2023 04:57:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=X0YA885Zz5Kvt8EHU8rMQ4WE+TUUQqvhzhkDDW/8/JM=; b=dcwBBwjhoDyPvufqR2rffskMVpxVDU+MHdGvmmwFobMsXZVbdK/44/ACCGV9aI3rDG SzmPxhbzqscPib3jVbMJt1qUNLy6g2Cr40/Jg205ieFFx13nMwgONHyNClJoYoBiZ7ol couImIxadghwzNjqfaYoBj4bxBgzAe2DAPFmvUjd7Jmod5Slee7FuHwgFOb1ojgtZuvi dc4oGFMfSZbQZWp8JKGullOFpudEhd+pOKLvLpx4ZEndO9bDn1/pI2xC8ZldkXKHOPE1 pqBIrNMF8v3P9UHo+psdYdllA6PpNWF5iD6Mh3NFP8WoduzwAtp0NHulypSqeZFDWmbq sLBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=X0YA885Zz5Kvt8EHU8rMQ4WE+TUUQqvhzhkDDW/8/JM=; b=en4DS2AwuOQgeQpxnycRs4e4VYLmZDjKi6gIuA3/aqxX9SL6plL4TGWIvCKfRre3n4 OhI4MeKDMOPNZ1Iw4Yj1GJ/r+GC7N8IcUU/Wyx9MND32P2bu8onO5zHu43Sbw0IBtfKX jS9O9R6xJFCi9iKoB2Ckfm3gFGp5YPi84MZcwOPqbxBufl5o3z3RCy/Aakwkt2gnLCX5 m7IrOWIPCfySiC69/wM3BOP7Feu/v2UkIYrGqA2n0gptCUtER3/7bIOsbDqlz8dJDJhx iZfCgTX+Lrs6k0pffhfhnIuCo/LqEPkpuZ1wLwTextcg2RoqTMQomjbx7oHF6ilPTvxP uOYg== X-Gm-Message-State: AO0yUKXL8onnvTdNEDANvX4CmbOCjhkpxHNCTGj15pUyCYcXmNLK+irG q/vX+jXGGzfvzJkb+v9VigNoxXZQ/Vz+IPdrTaaZHw== X-Google-Smtp-Source: AK7set/dyIVtxSMMBoR1xstDfdozoiAnHTC9U9c9I6+V12tFuaM1ZeRpSZYuONYJzW7vLrjSz/TnvkK7oQEFMi8FNN4= X-Received: by 2002:a1f:22d7:0:b0:405:cdc8:50b with SMTP id i206-20020a1f22d7000000b00405cdc8050bmr687427vki.41.1676638664643; Fri, 17 Feb 2023 04:57:44 -0800 (PST) MIME-Version: 1.0 References: <20230217100606.1234-1-nbd@nbd.name> In-Reply-To: From: Eric Dumazet Date: Fri, 17 Feb 2023 13:57:33 +0100 Message-ID: Subject: Re: [RFC v2] net/core: add optional threading for rps backlog processing To: Felix Fietkau Cc: netdev@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 17, 2023 at 1:35 PM Felix Fietkau wrote: > > On 17.02.23 13:23, Eric Dumazet wrote: > > On Fri, Feb 17, 2023 at 11:06 AM Felix Fietkau wrote: > >> > >> When dealing with few flows or an imbalance on CPU utilization, static RPS > >> CPU assignment can be too inflexible. Add support for enabling threaded NAPI > >> for RPS backlog processing in order to allow the scheduler to better balance > >> processing. This helps better spread the load across idle CPUs. > >> > >> Signed-off-by: Felix Fietkau > >> --- > >> > >> RFC v2: > >> - fix rebase error in rps locking > > > > Why only deal with RPS ? > > > > It seems you propose the sofnet_data backlog be processed by a thread, > > instead than from softirq ? > Right. I originally wanted to mainly improve RPS, but my patch does > cover backlog in general. I will update the description in the next > version. Does the approach in general make sense to you? > I do not know, this seems to lack some (perf) numbers, and descriptions of added max latencies and stuff like that :)