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

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

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

From: David Laight <hidden>
Date: 2012-10-10 11:25:58

On Wed, Oct 10, 2012 at 6:08 PM, Oliver Neukum [off-list ref] wrote:
quoted
A reset always applies to the whole device. Resets are used in error
handling of block devices (storage and uas). If you reset a device,
pre_reset() and post_reset() of all interfaces need to be called. So they
are part of the SCSI error handler. SCSI error handlers can allocate memory
only with GFP_NOIO (or GFP_ATOMIC) because any IO for paging
can cause the SCSI layer to wait for the error handling to finish. The error
handling can only finish when pre/post_reset() have finished. Catch-22
IMO, it is not practical to obey the rule for drivers, because driver may
call many other kernel component API which may allocate memory
via GFP_KERNEL in the path easily.
What about the error handler/sleep/resume code calling into the
memory allocator to indicate that all allocates be GFP_NOIO until
it calls back to indicate that the restricted path is complete.
Might be a per-cpu count?

	David



--
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-10 11:45:52

On Wed, Oct 10, 2012 at 7:25 PM, David Laight [off-list ref] wrote:
What about the error handler/sleep/resume code calling into the
memory allocator to indicate that all allocates be GFP_NOIO until
it calls back to indicate that the restricted path is complete.
Might be a per-cpu count?
IMO, it might be a per-task variable, but unfortunately no such
mechanism is provided by current kernel.

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