From patchwork Tue Jan 9 10:51:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souradeep Chakrabarti X-Patchwork-Id: 18858 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp27108dyi; Tue, 9 Jan 2024 02:52:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHL3yVZY2kpMYD28RR60wbUXWuX/0WdQPXM2jGwEG1v+1nfz9ZH49BvResHYtB0txHgHDWE X-Received: by 2002:a50:d59b:0:b0:557:5c0f:a7d1 with SMTP id v27-20020a50d59b000000b005575c0fa7d1mr2981425edi.68.1704797520025; Tue, 09 Jan 2024 02:52:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704797520; cv=none; d=google.com; s=arc-20160816; b=cESgeSxrvlCISpVQf58h6md5Zs21LsCWEzo1DbYEJS0odMQMxBlcpd73JADyRxHs3i R/xbiIYGChFtu3qO/RGqlMrotuZJM7eQaU19qGTG/fv6EKd7Y8j5A1tdo2s1714Sji/u wBjX7YgmVZyADoSWq5uH6sJR1w8B220dunLtmwR+Na4n/O5V2zDx1bZg5Nmt5rV3QtMV 6ER8VX2ZKVPFD8ZpbVqdQRsDTdpmwxePktGnWtsdd1ooqf1MFIklODZYKyhobAe9ao54 eTWpPtvVtkLUtq1/RRXZJsGLxbrOxxpj5xrvdxIN6B2Y5jq7wEy4TYY7CDhhLuyyh76B IUpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=r6Ddqc6DwsgTW4CdwH0T4dXEMiELjME4L4edzD42zIc=; fh=i0uHiUPKHfc1dSxTUTgp1cL8PKSGIUKO6qVCzrDTDzE=; b=Fi1uFEw7B8AFHtmfc+dAYp4fA+hRFywcte/0TnvAjv5PC1p1PT6RRWwxSqpNYb1mOM yvsCnxmaPjPZQ3D95mTQvUjvIZehgNhwn6UGKUeDiOpvIEWnkk9ZUtnPtR2p5I27s7JD SCfYTduJUYcaJ+keZIbKz5Yg4N+LZHyO9pi5qXr36siW+nQINbD/yuY2kn+/Q34LppcS rwxV2niS8LEIF2cd3fT3HSn0lNybYziwx9dj0aaPdZLiFW0IFpqbwImmKKvQXwo1ZL7N KRD/0scS933vbbyEGlPeKx5H8uxQQY2Hl+9fdS0x2hPKhh0JItR4g5rncsrK5vAjccGq 4Llg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=f1qZ6EaM; spf=pass (google.com: domain of linux-kernel+bounces-20726-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20726-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a22-20020a50c316000000b00557147e0578si651930edb.163.2024.01.09.02.51.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 02:52:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20726-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=f1qZ6EaM; spf=pass (google.com: domain of linux-kernel+bounces-20726-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20726-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A314F1F24F5A for ; Tue, 9 Jan 2024 10:51:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F27937159; Tue, 9 Jan 2024 10:51:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="f1qZ6EaM" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A6312364CC; Tue, 9 Jan 2024 10:51:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: by linux.microsoft.com (Postfix, from userid 1099) id 20A3920AEC89; Tue, 9 Jan 2024 02:51:27 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 20A3920AEC89 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1704797487; bh=r6Ddqc6DwsgTW4CdwH0T4dXEMiELjME4L4edzD42zIc=; h=From:To:Cc:Subject:Date:From; b=f1qZ6EaMyi32bimT4ayV09Mljr1bCjD+bGf0LkKQU9arxlLq6c4GAh+8Yg+k8A4eL MYxuTkscI5wY05igr0OdIpaRF2zCEmaQhWk5gayhP0KPl+BolJ5ATfT44SjSolH7ip Ixt1ZF3VzSSK9FlYTI4wt5nZkdNcMFZLFj+OwI/E= From: Souradeep Chakrabarti To: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, longli@microsoft.com, yury.norov@gmail.com, leon@kernel.org, cai.huoqing@linux.dev, ssengar@linux.microsoft.com, vkuznets@redhat.com, tglx@linutronix.de, linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org Cc: schakrabarti@microsoft.com, paulros@microsoft.com, Souradeep Chakrabarti Subject: [PATCH 0/4 net-next] net: mana: Assigning IRQ affinity on HT cores Date: Tue, 9 Jan 2024 02:51:14 -0800 Message-Id: <1704797478-32377-1-git-send-email-schakrabarti@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787609764438613194 X-GMAIL-MSGID: 1787609764438613194 This patch set introduces a new helper function irq_setup(), to optimize IRQ distribution for MANA network devices. The patch set makes the driver working 15% faster than with cpumask_local_spread(). Souradeep Chakrabarti (1): net: mana: Assigning IRQ affinity on HT cores Yury Norov (3): cpumask: add cpumask_weight_andnot() cpumask: define cleanup function for cpumasks net: mana: add a function to spread IRQs per CPUs .../net/ethernet/microsoft/mana/gdma_main.c | 87 ++++++++++++++++--- include/linux/bitmap.h | 12 +++ include/linux/cpumask.h | 16 ++++ lib/bitmap.c | 7 ++ 4 files changed, 112 insertions(+), 10 deletions(-)