From: Hailong Liu <hailong.liu@oppo.com>
To: Barry Song <21cnbao@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Uladzislau Rezki <urezki@gmail.com>,
Christoph Hellwig <hch@infradead.org>,
Lorenzo Stoakes <lstoakes@gmail.com>,
Vlastimil Babka <vbabka@suse.cz>, Michal Hocko <mhocko@suse.com>,
Baoquan He <bhe@redhat.com>, Matthew Wilcox <willy@infradead.org>,
"Tangquan . Zheng" <zhengtangquan@oppo.com>, <linux-mm@kvack.org>,
<linux-kernel@vger.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
Date: Thu, 25 Jul 2024 17:17:03 +0800 [thread overview]
Message-ID: <20240725091703.tsjpgltwgu3jwy5e@oppo.com> (raw)
In-Reply-To: <CAGsJ_4zWsh50Pzp0ntskT=eyfStALxD5BMNdWFrYJewrrx7V5Q@mail.gmail.com>
On Thu, 25. Jul 18:21, Barry Song wrote:
> On Thu, Jul 25, 2024 at 3:53 PM <hailong.liu@oppo.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.
next prev parent reply other threads:[~2024-07-25 9:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-25 3:53 hailong.liu
2024-07-25 6:21 ` Barry Song
2024-07-25 9:17 ` Hailong Liu [this message]
2024-07-25 9:34 ` Barry Song
2024-07-25 9:58 ` Hailong Liu
2024-07-25 10:22 ` Barry Song
2024-07-25 11:39 ` Baoquan He
2024-07-25 16:40 ` Hailong Liu
2024-07-26 1:31 ` Barry Song
2024-07-26 2:31 ` Baoquan He
2024-07-26 3:53 ` Barry Song
2024-07-29 1:48 ` Baoquan He
2024-07-30 3:24 ` Hailong Liu
2024-07-30 4:29 ` Baoquan He
2024-07-26 4:00 ` Hailong Liu
2024-07-26 5:03 ` Hailong Liu
2024-07-26 5:29 ` Barry Song
2024-07-26 8:37 ` Baoquan He
2024-07-26 8:48 ` Hailong Liu
2024-07-26 9:00 ` Hailong Liu
2024-07-26 9:29 ` Baoquan He
2024-07-26 9:15 ` Barry Song
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=20240725091703.tsjpgltwgu3jwy5e@oppo.com \
--to=hailong.liu@oppo.com \
--cc=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lstoakes@gmail.com \
--cc=mhocko@suse.com \
--cc=urezki@gmail.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=zhengtangquan@oppo.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