lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120516170124.GA21275@google.com>
Date:	Wed, 16 May 2012 10:01:24 -0700
From:	Tejun Heo <tj@...nel.org>
To:	Jiri Kosina <jkosina@...e.cz>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Jens Axboe <axboe@...nel.dk>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Stephen Hemminger <shemminger@...tta.com>,
	linux-kernel@...r.kernel.org
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ