From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Neukum Subject: Re: [PATCH v7 0/6] solve deadlock caused by memory allocation with I/O Date: Thu, 17 Jan 2013 10:44:17 +0100 Message-ID: <2496969.ClbQ8gLATp@linux-5eaq.site> References: <1357352744-8138-1-git-send-email-ming.lei@canonical.com> <20130116153744.70210fa3.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: Received: from cantor2.suse.de ([195.135.220.15]:38713 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758245Ab3AQJoV (ORCPT ); Thu, 17 Jan 2013 04:44:21 -0500 In-Reply-To: Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Ming Lei Cc: Andrew Morton , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-pm@vger.kernel.org, linux-mm@kvack.org, Alan Stern , Minchan Kim , "Rafael J. Wysocki" , Jens Axboe , "David S. Miller" On Thursday 17 January 2013 09:28:14 Ming Lei wrote: > - we still need some synchronization to avoid accessing the storage > between sys_sync and device suspend, just like system sleep case, > pm_restrict_gfp_mask is needed even sys_sync has been done > inside enter_state(). > > So looks the approach in the patch is simpler and more efficient, Even worse. The memory may be needed to resume and the reason we need to resume may be that we need to write out memory. And there is no way to make sure we don't dirty memory unless user space is frozen, so it is either this approach, or GFP_NOIO in the whole resume code path. Regards Oliver