[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240725091703.tsjpgltwgu3jwy5e@oppo.com>
Date: Thu, 25 Jul 2024 17:17:03 +0800
From: Hailong Liu <hailong.liu@...o.com>
To: Barry Song <21cnbao@...il.com>
CC: Andrew Morton <akpm@...ux-foundation.org>, Uladzislau Rezki
<urezki@...il.com>, Christoph Hellwig <hch@...radead.org>, Lorenzo Stoakes
<lstoakes@...il.com>, Vlastimil Babka <vbabka@...e.cz>, Michal Hocko
<mhocko@...e.com>, Baoquan He <bhe@...hat.com>, Matthew Wilcox
<willy@...radead.org>, "Tangquan . Zheng" <zhengtangquan@...o.com>,
<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v2] mm/vmalloc: fix incorrect
__vmap_pages_range_noflush() if vm_area_alloc_pages() from high order
fallback to order0
On Thu, 25. Jul 18:21, Barry Song wrote:
> On Thu, Jul 25, 2024 at 3:53 PM <hailong.liu@...o.com> wrote:
[snip]
>
> This is still incorrect because it undoes Michal's work. We also need to break
> the loop if (!nofail), which you're currently omitting.
IIUC, the origin issue is to fix kvcalloc with __GFP_NOFAIL return NULL.
https://lore.kernel.org/all/ZAXynvdNqcI0f6Us@dhcp22.suse.cz/T/#u
if we disable huge flag in kmalloc_node, the issue will be fixed.
>
> To avoid reverting Michal's work, the simplest "fix" would be,
>
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index caf032f0bd69..0011ca30df1c 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -3775,7 +3775,7 @@ void *__vmalloc_node_range_noprof(unsigned long
> size, unsigned long align,
> return NULL;
> }
>
> - if (vmap_allow_huge && (vm_flags & VM_ALLOW_HUGE_VMAP)) {
> + if (vmap_allow_huge && (vm_flags & VM_ALLOW_HUGE_VMAP) &
> !(gfp_mask & __GFP_NOFAIL)) {
> unsigned long size_per_node;
>
> /*
> >
> > [1] https://lore.kernel.org/lkml/20240724182827.nlgdckimtg2gwns5@oppo.com/
> > 2.34.1
>
> Thanks
> Barry
--
help you, help me,
Hailong.
Powered by blists - more mailing lists