From: Michal Hocko <mhocko@kernel.org>
To: Tejun Heo <tj@kernel.org>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Oliver Neukum <oneukum@suse.com>,
Bhaktipriya Shridhar <bhaktipriya96@gmail.com>,
Geliang Tang <geliangtang@163.com>,
"GeyslanG.Bem@Karyakshetra" <geyslan@gmail.com>,
Masanari Iida <standby24x7@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Vlastimil Babka <vbabka@suse.cz>,
Mel Gorman <mgorman@techsingularity.net>,
Saurabh Karajgaonkar <skarajga@visteon.com>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [RFC] usb: host: u132-hcd: Remove deprecated create_singlethread_workqueue
Date: Mon, 1 Aug 2016 15:50:36 +0200 [thread overview]
Message-ID: <20160801135036.GH13544@dhcp22.suse.cz> (raw)
In-Reply-To: <20160729131147.GJ2542@mtj.duckdns.org>
On Fri 29-07-16 09:11:47, Tejun Heo wrote:
> Hello, Alan.
>
> On Wed, Jul 27, 2016 at 04:45:19PM -0400, Alan Stern wrote:
> > > Hmm... That doesn't really make them dependable during memory reclaim.
> >
> > True. But it does mean that they can't cause a deadlock by waiting
> > indefinitely for some other memory to be paged out to the very device
> > they are on the access pathway for.
> >
> > > What happens when those allocations fail?
> >
> > The same thing that happens when any allocation fails -- the original
> > I/O request fails with -ENOMEM or the equivalent. In the case of
> > usb-storage, this is likely to trigger error recovery, which will need
> > to allocate memory of its own... A bad situation to get into.
>
> All that would do is deferring the deadlock, right? I'm not sure it
> makes a lot of sense to protect an IO path against memory pressure
> half-way. It either can be depended during memory reclaim or it
> can't.
Completely agreed! If the rescuer thread can block on a memory
allocation be it GFP_NOIO or others it is basically useless.
> The use of GFP_NOIO / ATOMIC is probably increases the chance
> of IO errors under moderate memory pressure too when there are
> dependable memory backing devices (and there better be) which can push
> things forward if called upon.
>
> Can MM people please chime in? The question is about USB stoage
> devices and memory reclaim. USB doesn't guarantee forward progress
> under memory pressure but tries a best-effort attempt with GFP_NOIO
> and ATOMIC. Is this the right thing to do?
If any real IO depends on those devices then this is not sufficient and
they need some form of guarantee for progress (aka mempool).
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2016-08-01 13:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 9:20 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 [this message]
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
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=20160801135036.GH13544@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--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=oneukum@suse.com \
--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
all inboxes | Powered by JetHome®