Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758213Ab2EPRBe (ORCPT ); Wed, 16 May 2012 13:01:34 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:62932 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757152Ab2EPRBa (ORCPT ); Wed, 16 May 2012 13:01:30 -0400 Date: Wed, 16 May 2012 10:01:24 -0700 From: Tejun Heo To: Jiri Kosina Cc: Andrew Morton , Jens Axboe , Linus Torvalds , Stephen Hemminger , linux-kernel@vger.kernel.org Subject: Re: [PATCH] floppy: convert to delayed work and single-thread wq Message-ID: <20120516170124.GA21275@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1098 Lines: 30 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/