[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130117135726.5b31fd0f.akpm@linux-foundation.org>
Date: Thu, 17 Jan 2013 13:57:26 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Ming Lei <ming.lei@...onical.com>
Cc: linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org, linux-pm@...r.kernel.org,
linux-mm@...ck.org, Alan Stern <stern@...land.harvard.edu>,
Oliver Neukum <oneukum@...e.de>,
Minchan Kim <minchan@...nel.org>,
"Rafael J. Wysocki" <rjw@...k.pl>, Jens Axboe <axboe@...nel.dk>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH v7 0/6] solve deadlock caused by memory allocation with
I/O
On Thu, 17 Jan 2013 09:28:14 +0800
Ming Lei <ming.lei@...onical.com> wrote:
> > If so, I wonder if we could avoid the whole problem by appropriately
> > syncing all dirty memory back to storage before starting to turn devices
> > off?
>
> The patchset is to address the probable deadlock problem by GFP_KERNEL
> during runtime suspend/resume which is per block/network device. I am
> wondering if syncing all dirty memory is suitable or necessary during
> per-storage/network device runtime resume/suspend:
>
> - sys_sync is very slow and runtime pm operation is frequent
>
> - it is not efficient because only sync dirty memory against the affected
> device is needed in theory and not necessary to sync all
>
> - 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, :-)
>
> Also, with the patchset, we can avoid many GFP_NOIO allocation
> which is fragile and not easy to use.
Fair enough, thanks.
I grabbed the patches for 3.9-rc1. It is good that the page
allocator's newly-added test of current->flags is not on the fastpath.
--
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