Messages in this thread | | | Date | Wed, 16 May 2012 10:01:24 -0700 | From | Tejun Heo <> | Subject | Re: [PATCH] floppy: convert to delayed work and single-thread wq |
| |
On Wed, May 16, 2012 at 09:36:51AM +0200, Jiri Kosina wrote: > +static struct workqueue_struct *floppy_wq; > + > static struct floppy_struct *_floppy = floppy_type; > static unsigned char current_drive; > static long current_count_sectors; > @@ -629,16 +631,15 @@ static inline void set_debugt(void) { } > static inline void debugt(const char *func, const char *msg) { } > #endif /* DEBUGT */ > > -typedef void (*timeout_fn)(unsigned long); > -static DEFINE_TIMER(fd_timeout, floppy_shutdown, 0, 0); > > +static DECLARE_DELAYED_WORK(fd_timeout, floppy_shutdown); > static const char *timeout_message;
There's no need to create a separate workqueue for this. There's just single work item which shouldn't be executed concurrently on different CPUs, right? Just queueing the work item onto system_nrt_wq should be enough.
Thanks.
-- tejun
| |