Re: [PATCH v2.6.36-rc7] infiniband: update workqueue usage

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tejun Heo
Date: Wednesday, October 20, 2010 - 4:03 am

Hello,

On 10/20/2010 12:21 PM, Bart Van Assche wrote:

That's too wide brushed position to agree with, but, well, let's talk
about that some other time.  :-)


Yeap, if breaking it down further makes sense, definitely.  If someone
is interested, the followings are the guidelines I've been following
in these conversions.

* If all the possibly pending works can be safely enumerated without
  too much difficulty and the works in question are not used during
  memory reclaim, use the system workqueue and use explicit
  flush/cancel_work[_sync]() instead of using flush_workqueue().
  Please note that flush_work_sync() isn't in mainline yet.  It's
  scheduled for the coming rc1 window.

* If works can be used during memory reclaim, there's no way around
  it.  A separate workqueue needs to be used.

* If works free themselves or are used to put the last reference of
  the containing object, they can't be flushed explicitly and thus
  need to be queued on a dedicated workqueue which serves as the
  flushing domain.

For this patch, I chose less intrusive path and just replaced system
wide workqueue with subsystem wide one mainly because I don't have
experience with or access to anything infiniband.  If someone wants to
push it further, I would be happy to help.

BTW, does the posted patch look safe to you?

Thanks.

-- 
tejun
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH v2.6.36-rc7] infiniband: update workqueue usage, Ralph Campbell, (Tue Oct 19, 10:22 am)
Re: [PATCH v2.6.36-rc7] infiniband: update workqueue usage, Bart Van Assche, (Tue Oct 19, 11:40 am)
Re: [PATCH v2.6.36-rc7] infiniband: update workqueue usage, Bart Van Assche, (Wed Oct 20, 3:21 am)
Re: [PATCH v2.6.36-rc7] infiniband: update workqueue usage, Tejun Heo, (Wed Oct 20, 4:03 am)