On Wed 30-03-22 14:25:02, Jaewon Kim wrote:
> The page allocation with GFP_NOIO may fail. And zram can handle this
> allocation failure. We do not need to print log for this.
GFP_NOIO doesn't have any special meaning wrt to failures. zram
allocates from the memory reclaim context which is a bad design IMHO.
The failure you are seeing indicates that PF_MEMALLOC context (memory
reclaim) which is allow to dip into memory reserves without any limit
cannot find any memory! This is really bad and it is good to learn about
that.
Your description doesn't really explain why we should be ignoring that
situation. Is the memory allocation failure gracefully recoverable?
--
Michal Hocko
SUSE Labs
On Wed 30-03-22 10:06:18, Michal Hocko wrote:
> On Wed 30-03-22 14:25:02, Jaewon Kim wrote:
> > The page allocation with GFP_NOIO may fail. And zram can handle this
> > allocation failure. We do not need to print log for this.
>
> GFP_NOIO doesn't have any special meaning wrt to failures. zram
> allocates from the memory reclaim context which is a bad design IMHO.
Btw. I forgot to mention that GFP_NOIO doesn't have any different
meaning than GFP_KERNEL from this (PF_MEMALLOC) allocation context
because this request will never perform a reclaim.
--
Michal Hocko
SUSE Labs
2022년 3월 30일 (수) 오후 5:49, Michal Hocko <[email protected]>님이 작성:
>
> On Wed 30-03-22 10:06:18, Michal Hocko wrote:
> > On Wed 30-03-22 14:25:02, Jaewon Kim wrote:
> > > The page allocation with GFP_NOIO may fail. And zram can handle this
> > > allocation failure. We do not need to print log for this.
> >
> > GFP_NOIO doesn't have any special meaning wrt to failures. zram
> > allocates from the memory reclaim context which is a bad design IMHO.
>
> Btw. I forgot to mention that GFP_NOIO doesn't have any different
> meaning than GFP_KERNEL from this (PF_MEMALLOC) allocation context
> because this request will never perform a reclaim.
Thank you for reply
Yes it was kswapd with PF_MEMALLOC, but I thought this zs_malloc could
fail on direct reclaim context.
I think zram is gracefully handling this ENOMEM situation, it actually
accounts the failed count as zram stats.
The failed page will be tried to swap out again later.
Yes I need to look into more about this memory shortage.
But I thought there were too many ALLOC_HADER requests in a short
time, and I want to see other
allocation failure logs like one with GFP_ATOMIC instead of this
zs_malloc failure log.
> --
> Michal Hocko
> SUSE Labs