Date: Fri, 19 May 2017 08:41:13 -0700 From: Adrian Chadd <adrian.chadd@gmail.com> To: Emeric POUPON <emeric.poupon@stormshield.eu> Cc: freebsd-arch <freebsd-arch@freebsd.org> Subject: Re: numa and taskqueues Message-ID: <CAJ-Vmo=6bpo1Yu6XosN3BiYOakjeXS8J7wenfubzkWz2SxXR1g@mail.gmail.com> In-Reply-To: <1914359731.54283525.1495178031163.JavaMail.zimbra@stormshield.eu> References: <1914359731.54283525.1495178031163.JavaMail.zimbra@stormshield.eu>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, I've been worried about the trend to create ncpu*taskqueue or ndomain*taskqueue for things unless we really need the priority / preemption behaviour. Otherwise we will just end up with a lot of pcpu/pdomain taskqueues that sit idly and/or compete infficiently. Anyway - I think it'd be nice to have domain aware and pcpu aware taskqueues so we can eventually migrate to a taskqueue group model of "one top level things for net processing" for devices to share, etc, etc. But for the short term just prototype it with some thin API in crypto that wraps the taskqueue / kproc work so it gets done, then push that work out for review/evaluation. if it does indeed work the way you intend, we can try to use it as a template for a higher level, shared taskqueue thing. Thanks, -adrian On 19 May 2017 at 00:13, Emeric POUPON <emeric.poupon@stormshield.eu> wrote: > 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 > _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=6bpo1Yu6XosN3BiYOakjeXS8J7wenfubzkWz2SxXR1g>