netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: Jes Sorensen <jsorensen@fb.com>
Cc: Networking <netdev@vger.kernel.org>,
	leonro@mellanox.com, Saeed Mahameed <saeedm@mellanox.com>,
	Kernel Team <kernel-team@fb.com>, Christoph Hellwig <hch@lst.de>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: mlx5 broken affinity
Date: Thu, 2 Nov 2017 09:57:24 +0200	[thread overview]
Message-ID: <9819bc7a-f560-2b6f-6ec2-41c9bb9ed6df@grimberg.me> (raw)
In-Reply-To: <f8624a01-f77a-ac0b-ba19-19c7150ca133@fb.com>

Jes,

> 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.

Adding Thomas to the thread.

My understanding that the thought is to prevent user-space from
messing up the nice linear assignment, but maybe this might be too
conservative?

The patch that prevented user-space from touching managed irq affinity
assignments:

--
commit 45ddcecbfa947f1dd8e8019bad9e90d6c9f2665c
Author: Thomas Gleixner <tglx@linutronix.de>
Date:   Mon Jul 4 17:39:25 2016 +0900

     genirq: Use affinity hint in irqdesc allocation

     Use the affinity hint in the irqdesc allocator. The hint is used to 
determine
     the node for the allocation and to set the affinity of the interrupt.

     If multiple interrupts are allocated (multi-MSI) then the allocator 
iterates
     over the cpumask and for each set cpu it allocates on their node 
and sets the
     initial affinity to that cpu.

     If a single interrupt is allocated (MSI-X) then the allocator uses 
the first
     cpu in the mask to compute the allocation node and uses the mask 
for the
     initial affinity setting.

     Interrupts set up this way are marked with the AFFINITY_MANAGED flag to
     prevent userspace from messing with their affinity settings.

     Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
     Cc: Christoph Hellwig <hch@lst.de>
     Cc: linux-block@vger.kernel.org
     Cc: linux-pci@vger.kernel.org
     Cc: linux-nvme@lists.infradead.org
     Cc: axboe@fb.com
     Cc: agordeev@redhat.com
     Link: 
http://lkml.kernel.org/r/1467621574-8277-5-git-send-email-hch@lst.de
     Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

      parent reply	other threads:[~2017-11-02  7:57 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01 16:19 mlx5 broken affinity Jes Sorensen
2017-11-01 17:21 ` Sagi Grimberg
2017-11-01 18:20   ` Jes Sorensen
2017-11-01 22:41     ` Saeed Mahameed
2017-11-01 23:02       ` Jes Sorensen
2017-11-02  8:28         ` Tariq Toukan
2017-11-02 10:08           ` Sagi Grimberg
2017-11-02 12:13             ` Andrew Lunn
2017-11-02 14:48             ` Jes Sorensen
2017-11-02 16:14               ` Sagi Grimberg
2017-11-02 17:13                 ` Jes Sorensen
2017-11-02 18:10                 ` Thomas Gleixner
2017-11-05  8:36                   ` Sagi Grimberg
2017-11-07 15:07                     ` Thomas Gleixner
2017-11-08  7:27                       ` Sagi Grimberg
2017-11-08 12:21                         ` David Laight
2017-11-08 16:13                           ` Jens Axboe
2017-11-09 10:09                             ` Christoph Hellwig
2017-11-09 15:18                               ` Jens Axboe
2017-11-09 15:08                         ` Saeed Mahameed
2017-11-09 15:40                           ` Sagi Grimberg
2017-11-08 16:19                       ` Jes Sorensen
2017-11-08 17:33                         ` Thomas Gleixner
2017-11-09 10:50                           ` Sagi Grimberg
2017-11-09 14:19                             ` Thomas Gleixner
2017-11-09 15:21                               ` Jens Axboe
2017-11-09 17:03                                 ` Thomas Gleixner
2017-11-09 20:11                                   ` Jens Axboe
2017-11-09 21:23                                     ` Thomas Gleixner
2017-11-09 21:30                                       ` Jens Axboe
2017-11-09 21:42                                     ` [RFD] Managed interrupt affinities [ Was: mlx5 broken affinity ] Thomas Gleixner
2017-11-10  5:56                                       ` Saeed Mahameed
2017-11-10 13:03                                         ` Thomas Gleixner
2017-11-13 19:20                                       ` Sagi Grimberg
2017-11-13 20:51                                         ` Thomas Gleixner
2017-11-13 21:13                                           ` Sagi Grimberg
2017-11-13 21:33                                             ` Thomas Gleixner
2017-11-13 21:49                                               ` Sagi Grimberg
2017-11-14 10:15                                                 ` Thomas Gleixner
2017-11-09 16:01                               ` mlx5 broken affinity Sagi Grimberg
2017-11-09 16:09                                 ` Jens Axboe
2017-11-09 17:07                                   ` Thomas Gleixner
2017-11-09 20:12                                     ` Jens Axboe
2017-11-09 21:25                                       ` Thomas Gleixner
2017-11-09 15:19                             ` Jens Axboe
2017-11-09 22:03                           ` Jes Sorensen
2017-11-02  7:57     ` Sagi Grimberg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9819bc7a-f560-2b6f-6ec2-41c9bb9ed6df@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=hch@lst.de \
    --cc=jsorensen@fb.com \
    --cc=kernel-team@fb.com \
    --cc=leonro@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).