Re: [PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments

2014-09-18 Thread Alan Stern
On Thu, 18 Sep 2014, Petr [iso-8859-1] Ml�dek wrote: > > This routine can be called from multiple work_structs, because a USB > > bus can have multiple hubs. > > The easiest solution would be to allocate the work queue with > the flag WQ_UNBOUND and max_active = 1. It will force serialization >

Re: [PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments

2014-09-18 Thread Tejun Heo
On Thu, Sep 18, 2014 at 06:15:02PM +0200, Petr Mládek wrote: > The easiest solution would be to allocate the work queue with > the flag WQ_UNBOUND and max_active = 1. It will force serialization > of all work items. Please use alloc_ordered_workqueue() for that purpose. WQ_UNBOUND + max_active

Re: [PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments

2014-09-18 Thread Petr Mládek
On Thu 18-09-14 10:24:23, Alan Stern wrote: > On Thu, 18 Sep 2014, Tejun Heo wrote: > > > Hello, Alan, Petr. > > > > On Wed, Sep 17, 2014 at 01:36:26PM -0400, Alan Stern wrote: > > > > - /* If khubd ever becomes multithreaded, this will need a lock */ > > > > + /* If hub_wq ever

Re: [PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments

2014-09-18 Thread Alan Stern
On Thu, 18 Sep 2014, Tejun Heo wrote: > Hello, Alan, Petr. > > On Wed, Sep 17, 2014 at 01:36:26PM -0400, Alan Stern wrote: > > > - /* If khubd ever becomes multithreaded, this will need a lock */ > > > + /* If hub_wq ever becomes multithreaded, this will need a lock */ > > > if (udev->wusb) {

Re: [PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments

2014-09-18 Thread Alan Stern
On Thu, 18 Sep 2014, Tejun Heo wrote: Hello, Alan, Petr. On Wed, Sep 17, 2014 at 01:36:26PM -0400, Alan Stern wrote: - /* If khubd ever becomes multithreaded, this will need a lock */ + /* If hub_wq ever becomes multithreaded, this will need a lock */ if (udev-wusb) {

Re: [PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments

2014-09-18 Thread Petr Mládek
On Thu 18-09-14 10:24:23, Alan Stern wrote: On Thu, 18 Sep 2014, Tejun Heo wrote: Hello, Alan, Petr. On Wed, Sep 17, 2014 at 01:36:26PM -0400, Alan Stern wrote: - /* If khubd ever becomes multithreaded, this will need a lock */ + /* If hub_wq ever becomes

Re: [PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments

2014-09-18 Thread Tejun Heo
On Thu, Sep 18, 2014 at 06:15:02PM +0200, Petr Mládek wrote: The easiest solution would be to allocate the work queue with the flag WQ_UNBOUND and max_active = 1. It will force serialization of all work items. Please use alloc_ordered_workqueue() for that purpose. WQ_UNBOUND + max_active == 1

Re: [PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments

2014-09-18 Thread Alan Stern
On Thu, 18 Sep 2014, Petr [iso-8859-1] Ml�dek wrote: This routine can be called from multiple work_structs, because a USB bus can have multiple hubs. The easiest solution would be to allocate the work queue with the flag WQ_UNBOUND and max_active = 1. It will force serialization of all

Re: [PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments

2014-09-17 Thread Tejun Heo
Hello, Alan, Petr. On Wed, Sep 17, 2014 at 01:36:26PM -0400, Alan Stern wrote: > > - /* If khubd ever becomes multithreaded, this will need a lock */ > > + /* If hub_wq ever becomes multithreaded, this will need a lock */ > > if (udev->wusb) { > > devnum = udev->portnum + 1; >

Re: [PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments

2014-09-17 Thread Alan Stern
On Wed, 17 Sep 2014, Petr Mladek wrote: > USB hub has started to use a workqueue instead of kthread. Let's update > the documentation and comments here and there. > > This patch mostly just replaces "khubd" with "hub_wq". There are only few > exceptions where the whole sentence was updated.

[PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments

2014-09-17 Thread Petr Mladek
USB hub has started to use a workqueue instead of kthread. Let's update the documentation and comments here and there. This patch mostly just replaces "khubd" with "hub_wq". There are only few exceptions where the whole sentence was updated. These more complicated changes can be found in the

[PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments

2014-09-17 Thread Petr Mladek
USB hub has started to use a workqueue instead of kthread. Let's update the documentation and comments here and there. This patch mostly just replaces khubd with hub_wq. There are only few exceptions where the whole sentence was updated. These more complicated changes can be found in the

Re: [PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments

2014-09-17 Thread Alan Stern
On Wed, 17 Sep 2014, Petr Mladek wrote: USB hub has started to use a workqueue instead of kthread. Let's update the documentation and comments here and there. This patch mostly just replaces khubd with hub_wq. There are only few exceptions where the whole sentence was updated. These more

Re: [PATCH v2 4/4] usb: hub: rename khubd to hub_wq in documentation and comments

2014-09-17 Thread Tejun Heo
Hello, Alan, Petr. On Wed, Sep 17, 2014 at 01:36:26PM -0400, Alan Stern wrote: - /* If khubd ever becomes multithreaded, this will need a lock */ + /* If hub_wq ever becomes multithreaded, this will need a lock */ if (udev-wusb) { devnum = udev-portnum + 1;