From owner-freebsd-net@freebsd.org Fri Oct 2 05:54:47 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4E9D63F774C for ; Fri, 2 Oct 2020 05:54:47 +0000 (UTC) (envelope-from michal@microwave.sk) Received: from daemon.microwave.sk (daemon.microwave.sk [217.144.16.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C2fMn3mK3z4D2g; Fri, 2 Oct 2020 05:54:45 +0000 (UTC) (envelope-from michal@microwave.sk) Received: from [192.168.0.11] (static-dsl-28.87-197-110.telecom.sk [87.197.110.28]) by daemon.microwave.sk (Postfix) with ESMTPSA id B5C6228731; Fri, 2 Oct 2020 07:54:40 +0200 (CEST) Subject: Re: mlx5 irq To: =?UTF-8?Q?Olivier_Cochard-Labb=c3=a9?= , Hans Petter Selasky Cc: freebsd-net@freebsd.org References: <0aa09fcc-dfcc-005e-8834-2a758ba6a03f@microwave.sk> <94978a05-94c6-cc55-229c-5a3c5352b29a@selasky.org> <3c64095f-8a45-0fb4-4835-7486bbd84663@microwave.sk> <32dbe3be-4b0a-6a94-d368-c5943d688bc6@selasky.org> From: =?UTF-8?Q?Michal_Van=c4=8do?= Message-ID: <2cac3af7-9835-9302-b0a1-91d61e0cb442@microwave.sk> Date: Fri, 2 Oct 2020 07:54:40 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 4C2fMn3mK3z4D2g X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.78 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[microwave.sk:s=mail]; FREEFALL_USER(0.00)[michal]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+mx]; ARC_NA(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.997]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[microwave.sk:+]; DMARC_POLICY_ALLOW(-0.50)[microwave.sk,quarantine]; NEURAL_HAM_SHORT(-0.76)[-0.757]; NEURAL_HAM_MEDIUM(-1.03)[-1.031]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_MIXED_CHARSET(1.00)[subject]; ASN(0.00)[asn:31127, ipnet:217.144.16.0/20, country:SK]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-net] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2020 05:54:47 -0000 On 01/10/2020 19:56, Olivier Cochard-Labbé wrote: > On Thu, Oct 1, 2020 at 12:28 PM Hans Petter Selasky wrote: > >> On 2020-10-01 11:13, Michal Vančo via freebsd-net wrote: >>> On 01/10/2020 10:52, Hans Petter Selasky wrote: >>>> On 2020-10-01 10:24, Michal Vančo wrote: >>>>> But why is the actual number of IRQ lines bigger than number of CPU >>>>> cores? >>>> There are some dedicated IRQ's used for firmware management. >>>> >>>> Else the driver will use the number of online CPU's by default as the >>>> number of rings, if the hardware supports it. >>> Thanks for clarification. Is there any way to optimize this? In my case >>> I have 2 CPU sockets with 8 cores each (SMT is disabled). NIC is >>> connected via PCIe to the first CPU socket (numa domain 0). In this >>> case, wouldn't it be better if all interrupts were firing only on cores >>> of first socket? >>> >> Hi, >> >> You can use "cpuset" to bind those IRQ threads to the right core. >> >> >> You could try this RC script to bind them: > https://github.com/ocochard/BSDRP/blob/master/BSDRP/Files/usr/local/etc/rc.d/mlx5en_affinity > Thank you. This is perfect.