Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 May 2017 09:13:51 +0200 (CEST)
From:      Emeric POUPON <emeric.poupon@stormshield.eu>
To:        freebsd-arch <freebsd-arch@freebsd.org>
Subject:   numa and taskqueues
Message-ID:  <1914359731.54283525.1495178031163.JavaMail.zimbra@stormshield.eu>

next in thread | raw e-mail | index | archive | help
Hello,

I have made a review to boost ipsec performance when very few flows are involved: https://reviews.freebsd.org/D10680 (reviews would be appreciated btw!)
The idea is to dispatch the crypto jobs using a taskqueue (with nb threads = nbcpus), details are in the review.

However, this does not scale well on multi socket architectures (ex: 2*6 cores), a lot of time is wasted in the locks.

For testing purposes, I created as many taskqueues as domains and I modified the taskqueue_start_threads function to specify a cpuset_t mask.
The idea here is to stay on the same domain to dispatch the crypto jobs and to notify back the crypto users.
This gives quite good performance so it seems to be an promising way.

Now the question is: how can I make the taskqueues "domain aware"?
Do I have to add some logic in crypto(9) or could this be abstracted in some other part of the kernel?
Another annoying part is the kprocs used by the return queues. We would also have to bind them to a single domain. How?

What do you think?

Emeric



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1914359731.54283525.1495178031163.JavaMail.zimbra>