All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Snook <chris.snook@gmail.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: David Miller <davem@davemloft.net>,
	pavel@ucw.cz, akpm@osdl.org, linux-kernel@vger.kernel.org,
	jcliburn@gmail.com, netdev@vger.kernel.org, rjw@rjwysocki.net,
	linux-mm@kvack.org, nic-devel@qualcomm.com, ronangeles@gmail.com,
	ebiederm@xmission.com
Subject: Re: [PATCH] Improve Atheros ethernet driver not to do order 4 GFP_ATOMIC allocation
Date: Thu, 03 Dec 2015 19:26:01 +0000	[thread overview]
Message-ID: <CAMXMK6v3i0djY2kW4OmJPvc5CuYFu8WeYeKa=Z0WSvk48wa6Rg@mail.gmail.com> (raw)
In-Reply-To: <20151203081646.GB9264@dhcp22.suse.cz>

[-- Attachment #1: Type: text/plain, Size: 1827 bytes --]

On Thu, Dec 3, 2015 at 12:16 AM Michal Hocko <mhocko@kernel.org> wrote:

> On Wed 02-12-15 22:43:31, Chris Snook wrote:
> > On Tue, Dec 1, 2015 at 12:35 PM David Miller <davem@davemloft.net>
> wrote:
> >
> > > From: Michal Hocko <mhocko@kernel.org>
> > > Date: Mon, 30 Nov 2015 14:21:29 +0100
> > >
> > > > On Sat 28-11-15 15:51:13, Pavel Machek wrote:
> > > >>
> > > >> atl1c driver is doing order-4 allocation with GFP_ATOMIC
> > > >> priority. That often breaks  networking after resume. Switch to
> > > >> GFP_KERNEL. Still not ideal, but should be significantly better.
> > > >
> > > > It is not clear why GFP_KERNEL can replace GFP_ATOMIC safely neither
> > > > from the changelog nor from the patch context.
> > >
> > > Earlier in the function we do a GFP_KERNEL kmalloc so:
> > >
> > > ¯\_(ツ)_/¯
> > >
> > > It should be fine.
> > >
> >
> > AFAICT, the people who benefit from GFP_ATOMIC are the people running all
> > their storage over NFS/iSCSI who are suspending their machines while
> > they're so busy they don't have any clean order 4 pagecache to drop, and
> > want the machine to panic rather than hang.
>
> Why would GFP_KERNEL order-4 allocation hang? It will fail if there are
> not >=4 order pages available even after reclaim and/or compaction.
> GFP_ATOMIC allocations should be used only when an access to memory
> reserves is really required. If the allocation just doesn't want to
> invoke direct reclaim then GFP_NOWAIT is a more suitable alternative.
>

The *machine* may hang if you can't bring back the interface that's
required to access the storage. It's a ridiculous use case, as Pavel noted.
I only pointed it out to note that there exists a rationale for GFP_ATOMIC.
It just isn't nearly as good as the rationale for using GFP_KERNEL.

-- Chris

[-- Attachment #2: Type: text/html, Size: 2478 bytes --]

  reply	other threads:[~2015-12-03 19:26 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26 16:34 4.3+: Atheros ethernet fails after resume from s2ram, due to order 4 allocation Pavel Machek
2015-11-26 16:34 ` Pavel Machek
2015-11-26 16:34 ` Pavel Machek
2015-11-26 21:56 ` Francois Romieu
2015-11-26 21:56   ` Francois Romieu
2015-11-27  8:20 ` Michal Hocko
2015-11-27  8:20   ` Michal Hocko
2015-11-28 14:50   ` Pavel Machek
2015-11-28 14:50     ` Pavel Machek
2015-11-28 14:51   ` [PATCH] Improve Atheros ethernet driver not to do order 4 GFP_ATOMIC allocation Pavel Machek
2015-11-28 14:51     ` Pavel Machek
2015-11-29 21:58     ` Sergei Shtylyov
2015-11-29 21:58       ` Sergei Shtylyov
2015-11-30 13:21     ` Michal Hocko
2015-11-30 13:21       ` Michal Hocko
2015-12-01 20:35       ` David Miller
2015-12-01 20:35         ` David Miller
2015-12-02 22:43         ` Chris Snook
2015-12-03  7:49           ` Pavel Machek
2015-12-03  7:49             ` Pavel Machek
2015-12-03  7:49             ` Pavel Machek
2015-12-03  8:16           ` Michal Hocko
2015-12-03  8:16             ` Michal Hocko
2015-12-03  8:16             ` Michal Hocko
2015-12-03 19:26             ` Chris Snook [this message]
2015-11-30 17:58     ` Eric Dumazet
2015-11-30 17:58       ` Eric Dumazet
2015-11-30 17:58       ` Eric Dumazet
2015-12-01 20:36       ` David Miller
2015-12-01 20:36         ` David Miller
2015-12-03 15:59         ` Pavel Machek
2015-12-03 15:59           ` Pavel Machek
2015-12-03 15:59     ` [PATCH net] atl1c: Improve " Pavel Machek
2015-12-03 15:59       ` Pavel Machek
2015-12-03 16:13       ` Michal Hocko
2015-12-03 16:13         ` Michal Hocko
2015-12-03 17:17       ` Eric Dumazet
2015-12-03 17:17         ` Eric Dumazet
2015-12-03 17:17         ` Eric Dumazet
2015-12-03 17:32         ` David Miller
2015-12-03 17:32           ` David Miller
2015-12-04  8:11           ` Pavel Machek
2015-12-04  8:11             ` Pavel Machek
2015-12-04 16:21             ` David Miller
2015-12-04 16:21               ` David Miller
2015-12-04 21:30               ` Pavel Machek
2015-12-04 21:30                 ` Pavel Machek
2015-12-04 22:01                 ` David Miller
2015-12-04 22:01                   ` David Miller
2015-12-04  8:50       ` Pavel Machek
2015-12-04  8:50         ` Pavel Machek

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='CAMXMK6v3i0djY2kW4OmJPvc5CuYFu8WeYeKa=Z0WSvk48wa6Rg@mail.gmail.com' \
    --to=chris.snook@gmail.com \
    --cc=akpm@osdl.org \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=jcliburn@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic-devel@qualcomm.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=ronangeles@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.