From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 08D24A0505; Tue, 17 May 2022 21:59:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA2454068B; Tue, 17 May 2022 21:59:45 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id E33D440041 for ; Tue, 17 May 2022 21:59:44 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24HHmgJC024539; Tue, 17 May 2022 12:59:44 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=WFGLygioQWfalUka8NCsiCkaKTn/jqVz2O5ZYZ6Tn8M=; b=ZjqoK1gWyK3A3cPXq9xyuAlh2wXWiY83FzB3Gin4cQtkNXT81HwLq+YYWz11im0PYnFI 9h9YFmJ5kd7Y/jusJZwgnUQDVgq9uyAqZ6f7BAt/WVAuqNjAgvAsJz+/TiZXINpCnIi/ ylHTuodckb+4teGcnlUY+ORjpDSZrSaPh4rXnbybbM+gOYNY46pGWjQGxX1T10ihdcpx sMVgRz4buO2GfjpTLHYuGL1GGqm3MXPQsAktf8Wot8LVWg8rZtVsQ9UJPUjnrK29xazX zM4ArnTOiml+zyebDB8zuuHFNCM8fcTPXeb+s6BFOc2V5ZKIUISY2XnqXiCcW5hvZQW1 yw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3g2bxswv00-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 17 May 2022 12:59:43 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 17 May 2022 12:59:42 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Tue, 17 May 2022 12:59:42 -0700 Received: from MININT-80QBFE8.corp.innovium.com (unknown [10.193.70.72]) by maili.marvell.com (Postfix) with ESMTP id 61F423F7092; Tue, 17 May 2022 12:59:40 -0700 (PDT) From: To: CC: , , , "Pavan Nikhilesh" Subject: [PATCH v3] doc: update Linux core isolation guide Date: Wed, 18 May 2022 01:29:39 +0530 Message-ID: <20220517195939.1921-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220517180856.1139-1-pbhagavatula@marvell.com> References: <20220517180856.1139-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: EF52aWB3yikZ0VgyU8FIByXnjMX5KW8U X-Proofpoint-GUID: EF52aWB3yikZ0VgyU8FIByXnjMX5KW8U X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-17_03,2022-05-17_02,2022-02-23_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Pavan Nikhilesh Update Linux core isolation guide to include isolation from timers, rcu processing and IRQs. Signed-off-by: Pavan Nikhilesh --- v3 Changes: - Add additional information links for Cgroups. v2 Changes: - Add references to the parameters used. - Add note about Linux cgroups. doc/guides/linux_gsg/enable_func.rst | 35 ++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/doc/guides/linux_gsg/enable_func.rst b/doc/guides/linux_gsg/enable_func.rst index 1df3ab0255..c989674422 100644 --- a/doc/guides/linux_gsg/enable_func.rst +++ b/doc/guides/linux_gsg/enable_func.rst @@ -90,16 +90,41 @@ Using Linux Core Isolation to Reduce Context Switches ----------------------------------------------------- While the threads used by a DPDK application are pinned to logical cores on the system, -it is possible for the Linux scheduler to run other tasks on those cores also. -To help prevent additional workloads from running on those cores, -it is possible to use the ``isolcpus`` Linux kernel parameter to isolate them from the general Linux scheduler. +it is possible for the Linux scheduler to run other tasks on those cores. +To help prevent additional workloads, timers, rcu processing and IRQs from running on those cores, it is possible to use +the Linux kernel parameters ``isolcpus``, ``nohz_full``, ``irqaffinity`` to isolate them from the general Linux scheduler tasks. -For example, if DPDK applications are to run on logical cores 2, 4 and 6, +For example, if a given CPU has 0-7 cores and DPDK applications are to run on logical cores 2, 4 and 6, the following should be added to the kernel parameter list: .. code-block:: console - isolcpus=2,4,6 + isolcpus=2,4,6 nohz_full=2,4,6 irqaffinity=0,1,3,5,7 + +.. Note:: + + More detailed information about the above parameters can be found at + https://www.kernel.org/doc/html/latest/timers/no_hz.html + https://www.kernel.org/doc/html/latest/core-api/irq/ + https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html + + +For more fine grained control over resource management and performance tuning one can look +into ``Linux cgroups``. + +Cpusets using cgroups:: + + https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/cpusets.html + +Systemd (CPUAffinity):: + + https://www.freedesktop.org/software/systemd/man/systemd.exec.html + +Also, see:: + + https://man7.org/linux/man-pages/man7/cpuset.7.html + https://www.suse.com/c/cpu-isolation-practical-example-part-5/ + https://www.rcannings.com/systemd-core-isolation/ .. _High_Precision_Event_Timer: -- 2.25.1