Re: [PATCH v2] zram: Prevent page allocation failure during zcomp_strm_alloc

From: Sergey Senozhatsky
Date: Mon Nov 23 2015 - 03:12:52 EST


On (11/23/15 16:43), Sergey Senozhatsky wrote:
[..]
> agree. we also would want to switch from vzalloc() to
> __vmalloc_node_flags(size, NUMA_NO_NODE,
> GFP_NOIO | __GFP_HIGHMEM | __GFP_ZERO)

[..]
> > So, Kyeongdon's patch will remove warning overhead and likely to
> > make zcomp_stram_alloc successful with vmalloc so I want to
> > roll it out first. And let's add a WARN_ON_ONCE to detect of
> > failure and rethink it when we receive such report.

hm... for k{z,m}alloc() it does reduce the warning overhead, but not
for vmalloc() -> warn_alloc_failed() [in theory]. So I guess, I'll
change vmalloc() to

__vmalloc(XXX,
GFP_NOIO | __GFP_NOWARN | __GFP_HIGHMEM | __GFP_ZERO,
PAGE_KERNEL);

/* passing __GFP_NOWARN */.

-ss
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/