Re: [PATCH 01/12] usbnet: introduce usbnet 3 command helpers

2 messages, 2 authors, 2012-10-11 · open the first message on its own page

Re: [PATCH 01/12] usbnet: introduce usbnet 3 command helpers

From: Oliver Neukum <hidden>
Date: 2012-10-11 04:11:58

On Thursday 11 October 2012 11:18:22 Ming Lei wrote:
On Wed, Oct 10, 2012 at 1:51 PM, Oliver Neukum [off-list ref] wrote:
quoted
No, the problem is autoresume.

Suppose we have a device with two interface. Interface A be usbnet; interface B
something you page on. Now consider that you can only resume both interfaces
and this is (and needs to be) done synchronously.

Now we can have this code path:

autoresume of device -> resume() -> kmalloc(..., GFP_KERNEL) ->
VM layer decides to start paging out -> IO to interface B -> autoresume of device
--> DEADLOCK
Currently scsi disk can only be runtime suspended when the device is not
opened, so are you sure that the paging out above can cause IO on a suspend
usb mass storage disk which is not mounted or opened by utility now?
We definitely do not wish to keep it that way. People at Intel are currently working
on better power management for sd, which would allow full autosuspend.

	Regards
		Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH 01/12] usbnet: introduce usbnet 3 command helpers

From: Ming Lei <hidden>
Date: 2012-10-11 08:14:05

On Thu, Oct 11, 2012 at 12:11 PM, Oliver Neukum [off-list ref] wrote:
On Thursday 11 October 2012 11:18:22 Ming Lei wrote:
quoted
Currently scsi disk can only be runtime suspended when the device is not
opened, so are you sure that the paging out above can cause IO on a suspend
usb mass storage disk which is not mounted or opened by utility now?
We definitely do not wish to keep it that way. People at Intel are currently working
on better power management for sd, which would allow full autosuspend.
OK, got it.

For auto-resume situation, it can be solved with switching the gpf_t flag
runtime inside helper, but I think it is better to do it after the sd's
full autosuspend is seen in -next tree.

For error handling case, it is inevitably for usbnet to allocate memory
with GFP_KERNEL because no usbnet drivers have implemented
.pre_reset and .post_reset callback, and no such actual problems
have been reported until now, so it should be OK to not consider the
case now.

So could we merge the patch set[1-11] first?

Thanks,
--
Ming Lei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help