Re: Linux 5.0-rc1 (test results)

From: Michal Hocko
Date: Tue Jan 08 2019 - 10:40:38 EST


On Tue 08-01-19 17:51:07, Guo Ren wrote:
[...]
> static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm)
> {
> pte_t *pte;
> unsigned long i;
>
> pte = (pte_t *) __get_free_page(GFP_KERNEL | __GFP_RETRY_MAYFAIL);
> ^^^^^^^^^^^^^^^^^^^
> It's necessary ?
> x86 & arm don't use
> it.
> if (!pte)
> return NULL;

That depends on whether you want OOM killer to be triggered for these
allocations. If you add the flag then the allocation bails out with a
failure rather than kill an oom victim.
--
Michal Hocko
SUSE Labs