From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tariq Toukan Subject: Re: mlx5 broken affinity Date: Thu, 2 Nov 2017 10:28:38 +0200 Message-ID: <3af0c164-8dde-b6f0-45e1-edbbb28e7f73@mellanox.com> References: <2187e555-2c4e-ef55-1c3a-17f5af54d762@fb.com> <573060a9-19a7-9133-ef52-fa947088dabb@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Sagi Grimberg , Networking , Leon Romanovsky , Saeed Mahameed , Kernel Team , Christoph Hellwig To: Jes Sorensen , Saeed Mahameed , Tariq Toukan Return-path: Received: from mail-he1eur01on0071.outbound.protection.outlook.com ([104.47.0.71]:19808 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751767AbdKBI2w (ORCPT ); Thu, 2 Nov 2017 04:28:52 -0400 In-Reply-To: <573060a9-19a7-9133-ef52-fa947088dabb@fb.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 02/11/2017 1:02 AM, Jes Sorensen wrote: > On 11/01/2017 06:41 PM, Saeed Mahameed wrote: >> On Wed, Nov 1, 2017 at 11:20 AM, Jes Sorensen wrote: >>> On 11/01/2017 01:21 PM, Sagi Grimberg wrote: >>> I am all in favor of making the automatic setup better, but assuming an >>> automatic setup is always right seems problematic. There could be >>> workloads where you may want to assign affinity explicitly. >>> >>> Jes >> >> I vaguely remember Nacking Sagi's patch as we knew it would break >> mlx5e netdev affinity assumptions. I remember that argument. Still the series found its way in. That series moves affinity decisions to kernel's responsibility. AFAI see, what kernel does is assign IRQs to the NUMA's one by one in increasing indexing (starting with cores of NUMA #0), no matter what NUMA is closer to the NIC. This means that if your NIC is on NUMA #1, and you reduce the number of channels, you might end up working only with the cores on the far NUMA. Not good! >> Anyway we already submitted the mlx5e patch that removed such assumption >> >> https://urldefense.proofpoint.com/v2/url?u=https-3A__patchwork.ozlabs.org_patch_809196_&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=zRrmoWoylV2tnG53v9ZA2w&m=Z6xtsiQVL8xhTauY_DrOWYDhci-D49TqNKLWV_HK5Ug&s=pkxagNCZzy5-ZzMRTxIQ5pDfFq8WOSRdSx5zeQpQdBI&e= ("net/mlx5e: Distribute RSS >> table among all RX rings") >> Jes please confirm you have it. >> >> And I agree here that user should be able to read >> /proc/irq/x/smp_affinity and even modify it if required. Totally agree. We should fix that ASAP. User must have write access. > > Hi Saeed, > > I can confirm I have that patch - the problem is also present in Linus' > current tree. > > I can read smp_affinity, but I cannot write to it. Indeed. Should be fixed. > > Cheers, > Jes > Thanks, Tariq