From: Lorenz Brun <lorenz@brun.one>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Igor Russkikh <irusskikh@marvell.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Manuel Ullmann <labre@posteo.de>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: atlantic: keep rings across suspend/resume
Date: Fri, 13 Dec 2024 18:00:31 +0100 [thread overview]
Message-ID: <V8ZFOS.N7LNJ4P9ABW3@brun.one> (raw)
In-Reply-To: <bbcd37de-c731-4f0b-92f0-8c332bb01c5b@lunn.ch>
Am Do, 12. Dez 2024 um 18:20:26 +01:00:00 schrieb Andrew Lunn
<andrew@lunn.ch>:
> On Thu, Dec 12, 2024 at 03:39:24AM +0100, Lorenz Brun wrote:
>> The rings are order-6 allocations which tend to fail on suspend due
>> to
>> fragmentation. As memory is kept during suspend/resume, we don't
>> need to
>> reallocate them.
>
> I don't know this driver. Are there other reasons to reallocate the
> rings? Change of MTU? ethtool settings? If they are also potentially
> going to run into memory fragmentation issues, maybe it would be
> better to use smaller order allocations, or vmalloc, if the hardware
> supports that, etc.
>
> Andrew
ethtool settings do indeed reallocate, but not during unsuspend where
we have GFP_NOIO. Smaller oder allocations would definitely be better,
but on systems without IOMMU that would probably pose a problem as
rings are generally assumed to be contigous by hardware (as far as I
understand). I don't have access to hardware docs, so I don't know if
you can make the HW work without physically-contiguous memory.
Linux just really doesn't handle high-order allocations well, I got one
unsuspend failure with 6GiB (!!) of free space in the relevant region
(but no order-6 or higher). I have no idea why it doesn't defragment
before failing the allocation as it clearly has enough memory.
kworker/u97:14: page allocation failure: order:6,
mode:0x40d00(GFP_NOIO|__GFP_COMP|__GFP_ZERO),
nodemask=(null),cpuset=/,mems_allowed=0
Node 0 Normal: 787628*4kB (UME) 234026*8kB (UME) 50882*16kB (UME)
13751*32kB (UME) 35*64kB (UME) 9*128kB (M) 0*256kB 0*512kB 0*1024kB
1*2048kB (H) 0*4096kB = 6282304kB
Regards,
Lorenz
next prev parent reply other threads:[~2024-12-13 17:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 2:39 [PATCH net] net: atlantic: keep rings across suspend/resume Lorenz Brun
2024-12-12 9:54 ` Michal Swiatkowski
2024-12-12 17:20 ` Andrew Lunn
2024-12-13 17:00 ` Lorenz Brun [this message]
2024-12-13 1:21 ` Jakub Kicinski
2024-12-13 13:58 ` Simon Horman
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=V8ZFOS.N7LNJ4P9ABW3@brun.one \
--to=lorenz@brun.one \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=irusskikh@marvell.com \
--cc=kuba@kernel.org \
--cc=labre@posteo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).