From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760656AbbJ3Tkg (ORCPT ); Fri, 30 Oct 2015 15:40:36 -0400 Received: from mx2.suse.de ([195.135.220.15]:34408 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759573AbbJ3Tke (ORCPT ); Fri, 30 Oct 2015 15:40:34 -0400 Date: Fri, 30 Oct 2015 20:40:32 +0100 (CET) From: Jiri Kosina X-X-Sender: jkosina@pobox.suse.cz To: Pavel Machek cc: Alan Stern , "Rafael J. Wysocki" , Dave Chinner , Jan Kara , Christoph Hellwig , Linus Torvalds , Al Viro , Tejun Heo , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH 0/3] PM, vfs: use filesystem freezing instead of kthread freezer In-Reply-To: <20151030174417.GA16781@amd> Message-ID: References: <20151030174417.GA16781@amd> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 30 Oct 2015, Pavel Machek wrote: > > I would say instead "no I/O is allowed from now on". Maybe that's an > > overstatement, but I think it comes closer to the truth. But that's what PM callbacks are for. > Exactly. And I'm pretty sure hardware drivers do use kernel threads, > and do I/O from them. > > LEDs are just one example And why is that relevant? First, I don't see any freezable kthread in leds class implementation whatsoever. Second, I am pretty sure that it's quite unlikely to participate in filesystem I/O. Sure, you need to suspend and resume the devices when going through suspend. That's why led_suspend() exists. How would try_to_freeze() help at all? That's basically just a fancy schedule() called at certain points. -- Jiri Kosina SUSE Labs