lkml.org 
[lkml]   [2012]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2012-05-16 19:41    [W:0.148 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site