Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: ks0204.kim@samsung.com (김경산)
Subject: setting nvme irq per cpu affinity in device driver
Date: Thu, 03 Sep 2015 09:33:19 +0900	[thread overview]
Message-ID: <007301d0e5e0$220062b0$66012810$@samsung.com> (raw)
In-Reply-To: alpine.LNX.2.00.1509021905520.23840@localhost.lm.intel.com

Hello, Keith Busch.
Thank you for your opinion. Yes, we've already considered the approach.

However, there were two issues regarding the way.
1. In our tests, setting affinity hint is not working on 4.2-rc6 driver.
Please find below code. It is current implementation (4.2-rc6)for setting
affinity hint.

static void nvme_set_irq_hints(struct nvme_dev *dev) {
        struct nvme_queue *nvmeq;
        int i;

        for (i = 0; i < dev->online_queues; i++) {
                nvmeq = dev->queues[i];

                if (!nvmeq->tags || !(*nvmeq->tags))
                        continue;    

                /*kyungsan : <- not reach here from second loop*/

                irq_set_affinity_hint(dev->entry[nvmeq->cq_vector].vector,
                                        blk_mq_tags_cpumask(*nvmeq->tags));
        }
}

As tags information is not properly configured, setting affinity for IO CQs
is not applied. 
It is only applied on Admin CQ.

2. Even with lower version of linux drivers which are able to set affinity
hint properly, we've noticed that '--hintpolicy=exact' does not work on
some linux distros such as debian.
Maybe there are some differences in irqbalance daemon regarding how to
handle hint information even with 'exact' policy.

Kindly Regards
Kyungsan Kim


-----Original Message-----
From: Linux-nvme [mailto:linux-nvme-bounces@lists.infradead.org] On Behalf
Of Keith Busch
Sent: Thursday, September 03, 2015 4:08 AM
To: ???
Cc: Linux-nvme at lists.infradead.org
Subject: Re: setting nvme irq per cpu affinity in device driver

On Wed, 2 Sep 2015, ??? wrote:
> Actually, in current status, device driver already tries to set 
> affinity_hint for IRQs during Q initialization.
> But in our tests, it does not guarantee the CPU distribution on 
> system-wide even with irqbalance daemon working, failing to resolve above
issues.

Are you running irqbalance with '--hintpolicy=exact'? It Seems to do the
right thing over here.

  reply	other threads:[~2015-09-03  0:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02 10:26 setting nvme irq per cpu affinity in device driver 김경산
2015-09-02 14:05 ` Christoph Hellwig
2015-09-03  5:01   ` 김경산
2015-09-06  8:06   ` 김경산
2015-09-07 17:54     ` 'Christoph Hellwig'
2015-09-10 10:25       ` 김경산
2015-09-08 14:47     ` Keith Busch
2015-09-09  0:35       ` 김경산
2015-09-02 19:07 ` Keith Busch
2015-09-03  0:33   ` 김경산 [this message]
2015-09-03 14:14     ` Keith Busch

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='007301d0e5e0$220062b0$66012810$@samsung.com' \
    --to=ks0204.kim@samsung.com \
    /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