From patchwork Mon Jan 29 06:21:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souradeep Chakrabarti X-Patchwork-Id: 19567 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp389252dyb; Sun, 28 Jan 2024 22:22:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IFr4cux2TATCCHv5GQqfI8+ObOw0QlZPcKlJXCRAUFzfDVDqJb5Wx+Av/MYl8Sr8Ak36xPB X-Received: by 2002:aa7:991d:0:b0:6dd:82b0:1bed with SMTP id z29-20020aa7991d000000b006dd82b01bedmr1798509pff.11.1706509356991; Sun, 28 Jan 2024 22:22:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706509356; cv=pass; d=google.com; s=arc-20160816; b=fZJxXE+hCmz1bJ9na/YAQx+QJi1dVolB9wr6ZNYx4jaF1bEfvDAWnviAcdjAFAMdXP QfhYwIrfs4VlXxfSdfS1iBGpUNlQlHx/CNHAPZZMUS5N1ulO5nBRYyu+sLvwTM/YYw0w cycVtWpTJTVfWt1rm6lZktDrsJmQsgsL4PeqwV1x4Aqtxjenye9f0X/yi0GUZeinLCmM qZnvcfVtHwO8Z//2ROF8XxUcBe+oL/EXFXbdCD/Dok5etTlsGQ8P30+KZ99/uRu8FoM1 TVWYWg8c9YgWsrjR5aqZAFXb0YXJL9xUntVBKlGPnaQ21y1Dx55A/j2yveVjryxxDb83 po3A== ARC-Message-Signature: i=2; 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=jcQHPDqDH8my6Yg3JLMYBYEVM6vbGA15v2Ma7JnnpbI=; fh=i0uHiUPKHfc1dSxTUTgp1cL8PKSGIUKO6qVCzrDTDzE=; b=cmftLwkPuw65pVxDvw+zwN3PKHQN4yuxtFhBqtpJcHphB+Fpo0XdxBMCE19FFXCfF4 xdTUyF1mDsZZNCviXbXwqPu2xls2TRX8/3oifU7+i22ATVBLOg4WfPx5KOjFmm2ofSG8 vRhY9gKlpgHw6v3BfHZf0rF1ipgI7L/9+4bHF47uTYBgbcvC7BU67snnibly4AD/aiXy rb1U9727KA1/MI9zDgP/zBqKzOiF4LegWdrWhO/rx1Stt9uRMdt+Hjba/K7ClspcMQiv 322sXS/frEC8dUKjCx4TeXgysn8sWikE5UgRaGeh2mg8GugSUVKie0NmD4bQXw8uXUaw DWKA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=jSZtqzg7; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-42223-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42223-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l7-20020a635707000000b005d8d56cd646si405405pgb.130.2024.01.28.22.22.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 22:22:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42223-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=jSZtqzg7; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-42223-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42223-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DEAF2B22D0B for ; Mon, 29 Jan 2024 06:22:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 101274D135; Mon, 29 Jan 2024 06:21:34 +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="jSZtqzg7" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA3424E1BA; Mon, 29 Jan 2024 06:21:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706509291; cv=none; b=QWSir/IqRCoH8YjZtzc3b7UO8+GGuW3eGyWhyMLZyMme4b5UHB7jEuA7T4vuiECjoNcovW2DKl5AhPmU5Yo3hbvkmi0sTrUginyzcjTuUROnzvghJFBoVVotbyBCoJUfsDAdUeXqMTPGF2QX7Jx3iN+YOW81UJQlPEDlsZ33/9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706509291; c=relaxed/simple; bh=ec1CV2THC3H1N8o33FHc4Q4ijpR0Th7MXa1oozMc+Ew=; h=From:To:Cc:Subject:Date:Message-Id; b=Cgzwo5g4fFeP7Asaamc+syDeScPW7t6xZZY5XAoYeqjA3Pmqi6PIBzWBXBTQTPkvs2AbJmxxj3ruepnD9wJVVZQ0YHiKqE9F8xtko0VPuZ5dJYGzveaANAcPrskVV0H4ThwV0xdfcZq7pF9JZb3PqemLz8xWThBi1lKqJoK7rTI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=jSZtqzg7; arc=none smtp.client-ip=13.77.154.182 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 108FC20E67C9; Sun, 28 Jan 2024 22:21:23 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 108FC20E67C9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1706509283; bh=jcQHPDqDH8my6Yg3JLMYBYEVM6vbGA15v2Ma7JnnpbI=; h=From:To:Cc:Subject:Date:From; b=jSZtqzg7Z/LHGLI+tcluq4k/xiPa8sO7gsoNtcAZaeIUYAXXZzaeeBvOtRXMg+DFM QFr1bU7qG+LYs+qrJB3HGsQsvviftwdDy2sF6wAyoUZRq7llrFBht1cVV+OH+8WwFD lg0saiuaj7R/A/qWiKyRJCsbZp7mfwD8F3OaywkQ= 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 V3 net-next] net: mana: Assigning IRQ affinity on HT cores Date: Sun, 28 Jan 2024 22:21:03 -0800 Message-Id: <1706509267-17754-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: 1789404755369542082 X-GMAIL-MSGID: 1789404755369542082 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 | 88 ++++++++++++++++--- include/linux/bitmap.h | 12 +++ include/linux/cpumask.h | 16 ++++ lib/bitmap.c | 7 ++ 4 files changed, 113 insertions(+), 10 deletions(-) --- Change: V1 -> V2: Added some details on the performance study on the patch 4/4. V2 -> V3: Commit message has been modified, fixed the table in patch 4/4.