From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx177.postini.com [74.125.245.177]) by kanga.kvack.org (Postfix) with SMTP id 6A7F46B0062 for ; Tue, 30 Oct 2012 23:05:34 -0400 (EDT) Received: from mail-ea0-f169.google.com ([209.85.215.169]) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1TTOcX-0000rA-Fs for linux-mm@kvack.org; Wed, 31 Oct 2012 03:05:33 +0000 Received: by mail-ea0-f169.google.com with SMTP id k11so470088eaa.14 for ; Tue, 30 Oct 2012 20:05:33 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <2504263.kbM6W9JoH9@linux-lqwf.site> Date: Wed, 31 Oct 2012 11:05:33 +0800 Message-ID: Subject: Re: [PATCH v3 2/6] PM / Runtime: introduce pm_runtime_set[get]_memalloc_noio() From: Ming Lei Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Oliver Neukum Cc: Alan Stern , linux-kernel@vger.kernel.org, Minchan Kim , Greg Kroah-Hartman , "Rafael J. Wysocki" , Jens Axboe , "David S. Miller" , Andrew Morton , netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-pm@vger.kernel.org, linux-mm@kvack.org On Wed, Oct 31, 2012 at 10:08 AM, Ming Lei wrote: >> I am afraid it is, because a disk may just have been probed as the deviceis being reset. > > Yes, it is probable, and sounds like similar with 'root_wait' problem, see > prepare_namespace(): init/do_mounts.c, so looks no good solution > for the problem, and maybe we have to set the flag always before resetting > usb device. The below idea may help the problem which 'memalloc_noio' flag isn't set during usb_reset_device(). - for usb mass storage device, call pm_runtime_set_memalloc_noio(true) inside usb_stor_probe2() and uas_probe(), and call pm_runtime_set_memalloc_noio(false) inside uas_disconnect() and usb_stor_disconnect(). - for usb network device, register_netdev() is always called inside usb interface's probe(), looks no such problem. Thanks, -- Ming Lei -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org