Re: [RFC workqueue/driver-core PATCH 1/5] workqueue: Provide queue_work_near to queue work near a given NUMA node

2018-10-02 Thread Tejun Heo
Hello, On Tue, Oct 02, 2018 at 11:23:26AM -0700, Alexander Duyck wrote: > >Yeah, it's all in wq_select_unbound_cpu(). Right now, if the > >requested cpu isn't in wq_unbound_cpumask, it falls back to dumb > >round-robin. We can probably do better there and find the nearest > >node considering

Re: [RFC workqueue/driver-core PATCH 1/5] workqueue: Provide queue_work_near to queue work near a given NUMA node

2018-10-02 Thread Tejun Heo
Hello, On Mon, Oct 01, 2018 at 02:54:39PM -0700, Alexander Duyck wrote: > >It might be better to leave queue_work_on() to be used for per-cpu > >workqueues and introduce queue_work_near() as you suggseted. I just > >don't want it to duplicate the node selection code in it. Would that > >work? >

Re: [RFC workqueue/driver-core PATCH 1/5] workqueue: Provide queue_work_near to queue work near a given NUMA node

2018-10-01 Thread Tejun Heo
Hello, On Wed, Sep 26, 2018 at 03:19:21PM -0700, Alexander Duyck wrote: > On 9/26/2018 3:09 PM, Tejun Heo wrote: > I could just use queue_work_on probably, but is there any issue if I > am passing CPU values that are not in the wq_unbound_cpumask? That That should be fine. If it can't

Re: [RFC workqueue/driver-core PATCH 1/5] workqueue: Provide queue_work_near to queue work near a given NUMA node

2018-09-26 Thread Tejun Heo
Hello, On Wed, Sep 26, 2018 at 03:05:17PM -0700, Alexander Duyck wrote: > I am using unbound workqueues. However there isn't an interface that > exposes the NUMA bits of them directly. All I am doing with this > patch is adding "queue_work_near" which takes a NUMA node as an > argument and then

Re: [RFC workqueue/driver-core PATCH 1/5] workqueue: Provide queue_work_near to queue work near a given NUMA node

2018-09-26 Thread Tejun Heo
Hello, On Wed, Sep 26, 2018 at 02:51:38PM -0700, Alexander Duyck wrote: > This patch provides a new function queue_work_near which is meant to > schedule work on the nearest unbound CPU to the requested NUMA node. The > main motivation for this is to help assist asynchronous init to better >