[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1600693216.2424.92.camel@suse.com>
Date: Mon, 21 Sep 2020 15:00:16 +0200
From: Oliver Neukum <oneukum@...e.com>
To: Pavel Machek <pavel@...x.de>
Cc: gregkh@...uxfoundation.org, stern@...land.harvard.edu,
johan@...nel.org, gustavoars@...nel.org, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: yurex: Rearrange code not to need GFP_ATOMIC
Am Montag, den 21.09.2020, 14:52 +0200 schrieb Pavel Machek:
> Hi!
> >
> > Task goes to TASK_INTERRUPTIBLE
> >
> > > if (retval >= 0)
> > > timeout = schedule_timeout(YUREX_WRITE_TIMEOUT);
> >
> > Task turns into Sleeping Beauty until timeout
>
> Is there way to do the allocations for submit_urb before the
No. In theory you do not even know which HC will get the URB.
Preallocating resources is impossible. I do consider this a
design bug in the usbcore API.
> prepare_to_wait? GFP_ATOMIC would be nice to avoid... and doing
> GFP_ATOMIC from normal process context just because of task_state
> seems ... wrong.
Well, then you will need to change the rest of the logic
and use a struct completion. Give the age and practical
relevance of the driver I would recommend against making
such drastic changes and let it just be in its awkward
but correct state.
Regards
Oliver
Powered by blists - more mailing lists