All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Petr Mladek <pmladek@suse.cz>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Tejun Heo <tj@kernel.org>,
	Joe Lawrence <joe.lawrence@stratus.com>,
	Jiri Kosina <jkosina@suse.cz>, <linux-usb@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 0/6] usb: hub: convert khubd into workqueue
Date: Fri, 19 Sep 2014 15:38:50 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1409191536000.1133-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <1411140744-21424-1-git-send-email-pmladek@suse.cz>

On Fri, 19 Sep 2014, Petr Mladek wrote:

> The 3rd version of the patchset is slightly reordered and refactored
> as suggested earlier. See below for more details.
> 
> IMHO, the result is more clean. But feel free to ask me to revert it.
> I do not want to make the review more complicated. Well, I double checked
> the diff of patches files between v2 and v3. It is pretty small and only
> the expected changes are there.
> 
> Changes in:
>     + v3:
> 	+ split the optimization of hub->hdev reference counting
> 	  into separate patch; usable standalone (1st patch)
> 
> 	+ switch order of the two patches that convert the kthread
> 	  and that remove the while cycle in hub_event(); it is
> 	  cleaner (2nd and 3rd patch)
> 
> 	+ use ordered workqueue by default; it makes it compatible
> 	  with the original kthread solution (3rd patch)
> 
>         + added optional patch that allows to process events
> 	  in parallel (6th patch)
> 
> 	+ fixed the suggested stylistic problems (2nd and 3rd patch)
> 
> 
>     + v2:
> 	+ solved potential races:
> 	  	 + get hub->kref in kick_hub_wq()
> 		 + call usb_get_dev(hdev) in hub_probe()
> 		   and 	usb_put_dev(hdev) in hub_release()
> 		 + INIT_WORK only once in hub_probe()
> 
> 	 + do not call cancel_work_sync() in hub_disconnect()
> 	   to keep it fast
> 
> 	 + rename kick_khubd() to kick_hub_wq() already
> 	   in the first patch; IMHO, it is cleaner while
> 	   adding only very few changes
> 
> 
> The workqueue API is well defined and tested. It has many options
> that could be used to tune the scheduling. The code is usually
> easier and thus more safe. It allows to avoid the extra thread
> in most cases. It has has clearly defined behavior vrt. system suspend.
> 
> This patchset converts khubd into the workqueue. It saves one thread,
> lock, and list.
> 
> It  looks huge but the main change is in the first patch. The rest is
> simple renaming of functions, comments and documentation.
> 
> 	   
> Thanks a lot Alan Stern and Tejun Heo for hints and guidance.
> 
> The patches can be applied either against Linus' tree or linux-next.

Very nice work.  I haven't tried it out, but it all looks good.  No
doubt we will be able to sort out unforeseen troubles if any arise,
without much difficulty.

For all six patches,

Acked-by: Alan Stern <stern@rowland.harvard.edu>

Alan Stern


  parent reply	other threads:[~2014-09-19 19:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-19 15:32 [PATCH v3 0/6] usb: hub: convert khubd into workqueue Petr Mladek
2014-09-19 15:32 ` [PATCH v3 1/6] usb: hub: keep hub->dev reference all the time when struct usb_hub lives Petr Mladek
2014-09-19 15:32 ` [PATCH v3 2/6] usb: hub: rename hub_events() to hub_event() and handle only one event there Petr Mladek
2014-09-19 15:32 ` [PATCH v3 3/6] usb: hub: convert khubd into workqueue Petr Mladek
2014-09-19 15:32 ` [PATCH v3 4/6] usb: hub: rename usb_kick_khubd() to usb_kick_hub_wq() Petr Mladek
2014-09-19 15:32 ` [PATCH v3 5/6] usb: hub: rename khubd to hub_wq in documentation and comments Petr Mladek
2014-09-19 15:32 ` [PATCH v3 6/6] usb: hub: allow to process more usb hub events in parallel Petr Mladek
2014-09-19 19:38 ` Alan Stern [this message]
2014-09-20 20:41   ` [PATCH v3 0/6] usb: hub: convert khubd into workqueue Paul Zimmerman
2014-09-24  5:19     ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44L0.1409191536000.1133-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=gregkh@linuxfoundation.org \
    --cc=jkosina@suse.cz \
    --cc=joe.lawrence@stratus.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pmladek@suse.cz \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.