From: Oliver Neukum <oneukum@suse.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Geliang Tang <geliangtang@163.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Bhaktipriya Shridhar <bhaktipriya96@gmail.com>,
"GeyslanG.Bem@Karyakshetra" <geyslan@gmail.com>,
Masanari Iida <standby24x7@gmail.com>, Tejun Heo <tj@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alan Stern <stern@rowland.harvard.edu>,
Vlastimil Babka <vbabka@suse.cz>,
Mel Gorman <mgorman@techsingularity.net>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
Saurabh Karajgaonkar <skarajga@visteon.com>
Subject: Re: [RFC] usb: host: u132-hcd: Remove deprecated create_singlethread_workqueue
Date: Tue, 02 Aug 2016 12:03:23 +0200 [thread overview]
Message-ID: <1470132203.30985.16.camel@suse.com> (raw)
In-Reply-To: <20160802081801.GC12403@dhcp22.suse.cz>
On Tue, 2016-08-02 at 10:18 +0200, Michal Hocko wrote:
> On Tue 02-08-16 10:06:12, Oliver Neukum wrote:
> > On Mon, 2016-08-01 at 10:20 -0400, Tejun Heo wrote:
> > > Hello,
> >
> > > > If any real IO depends on those devices then this is not sufficient and
> > > > they need some form of guarantee for progress (aka mempool).
> > >
> > > Oliver, Alan, what do you think? If USB itself can't operate without
> > > allocating memory during transactions, whatever USB storage drivers
> >
> > It cannot. The IO must be described to the hardware with a data
> > structure in memory.
> >
> > > are doing isn't all that meaningful. Can we proceed with the
> > > workqueue patches? Also, it could be that the only thing GFP_NOIO and
> > > GFP_ATOMIC are doing is increasing the chance of IO failures under
> > > memory pressure. Maybe it'd be a good idea to reconsider the
> > > approach?
> >
> > We had actual deadlocks with GFP_KERNEL. It seems to me that the SCSI
> > layer can deal with IO that cannot be completed due to a lack of memory
> > at least somewhat, but a deadlock within a driver would obviously be
> > deadly. So I don't think that mempools would remove the need for
> > GFP_NOIO as there are places in usbcore we cannot enter the page
> > laundering path from. They are an additional need.
>
> OK, I guess there is some misunderstanding here. I believe that Tejun
> wasn't arguing to drop GFP_NOIO. It might be really needed for the dead
> lock avoidance. No question about that. The whole point is that
> WQ_RECLAIM might be completely pointless because a rescuer wouldn't help
> much if the work item would do GFP_NOIO and get stuck in the page
> allocator.
But that can be a problem only if the items on the work queue are
actually run and without WQ_MEM_RECLAIM that guarantee cannot be made.
We can deal with failures of memory allocation. But the requests
must actually terminate.
Regards
Oliver
next prev parent reply other threads:[~2016-08-02 10:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 9:20 [RFC] usb: host: u132-hcd: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
2016-07-27 9:29 ` Oliver Neukum
2016-07-27 18:00 ` Tejun Heo
2016-07-27 18:54 ` Alan Stern
2016-07-27 19:23 ` Tejun Heo
2016-07-27 20:45 ` Alan Stern
2016-07-29 13:11 ` Tejun Heo
2016-08-01 13:50 ` Michal Hocko
2016-08-01 14:20 ` Tejun Heo
2016-08-01 18:00 ` Alan Stern
2016-08-01 18:28 ` Michal Hocko
2016-08-02 8:06 ` Oliver Neukum
2016-08-02 8:18 ` Michal Hocko
2016-08-02 10:03 ` Oliver Neukum [this message]
2016-08-02 11:34 ` Michal Hocko
2016-08-02 11:44 ` Oliver Neukum
2016-08-02 12:48 ` Michal Hocko
2016-08-02 13:29 ` Oliver Neukum
2016-08-02 19:02 ` Tejun Heo
2016-08-02 21:26 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1470132203.30985.16.camel@suse.com \
--to=oneukum@suse.com \
--cc=bhaktipriya96@gmail.com \
--cc=geliangtang@163.com \
--cc=geyslan@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=skarajga@visteon.com \
--cc=standby24x7@gmail.com \
--cc=stern@rowland.harvard.edu \
--cc=tj@kernel.org \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox