Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966096Ab2EPU3a (ORCPT ); Wed, 16 May 2012 16:29:30 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:59403 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965362Ab2EPU33 (ORCPT ); Wed, 16 May 2012 16:29:29 -0400 Date: Wed, 16 May 2012 13:29:24 -0700 From: Tejun Heo To: Jiri Kosina Cc: Linus Torvalds , Stephen Hemminger , Andrew Morton , Jens Axboe , linux-kernel@vger.kernel.org Subject: Re: [PATCH] floppy: convert to delayed work and single-thread wq Message-ID: <20120516202924.GE21275@google.com> References: <20120516170124.GA21275@google.com> <20120516195332.GC21275@google.com> <20120516200147.GD21275@google.com> 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: 942 Lines: 24 On Wed, May 16, 2012 at 10:24:37PM +0200, Jiri Kosina wrote: > In floppy_grab_irq_and_dma() the point is to drain the workqueue > completely (before the conversion, we were just using > flush_work_sync(&floppy_work) for particular work item), and for that > flush_work() is not sufficient any more. > > So I am really considering going back to driver-specific singlethreaded > workqueue. Ummm... still confused. flush_work_sync() is fine too. If you have two, two calls to flush_work_sync() are equivalent to flushing the workqueue in effect. You just need to avoid flush_workqueue() because system workqueues may be hosting work items which can run arbitrarily long. 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/