* [PATCH v3] vmalloc: Add the right hint when vmalloc failed
@ 2020-07-10 12:17 Tian Tao
2020-07-10 12:43 ` Matthew Wilcox
0 siblings, 1 reply; 5+ messages in thread
From: Tian Tao @ 2020-07-10 12:17 UTC (permalink / raw)
To: akpm, linux-mm, linux-kernel; +Cc: linuxarm
In fact "vmalloc=<size>" cmdline option is not available on many
platforms.When the user encounters this error, add the correct
hint to prevent misleading.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
v2:
Add appropriate hints and let users decide if they can increase
the size of the vmalloc by vmalloc=<size> depending on their platform
v3:
change the patch name and commit messages.
---
mm/vmalloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 89e83d3..c6ae7e6 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1238,8 +1238,8 @@ static struct vmap_area *alloc_vmap_area(unsigned long size,
}
if (!(gfp_mask & __GFP_NOWARN) && printk_ratelimit())
- pr_warn("vmap allocation for size %lu failed: use vmalloc=<size> to increase size\n",
- size);
+ pr_warn("vmap allocation for size %lu failed: use vmalloc=<size> to increase size,
+ if your ARCH supports it\n", size);
kmem_cache_free(vmap_area_cachep, va);
return ERR_PTR(-EBUSY);
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3] vmalloc: Add the right hint when vmalloc failed
2020-07-10 12:17 [PATCH v3] vmalloc: Add the right hint when vmalloc failed Tian Tao
@ 2020-07-10 12:43 ` Matthew Wilcox
2020-07-10 13:49 ` Uladzislau Rezki
0 siblings, 1 reply; 5+ messages in thread
From: Matthew Wilcox @ 2020-07-10 12:43 UTC (permalink / raw)
To: Tian Tao; +Cc: akpm, linux-mm, linux-kernel, linuxarm
On Fri, Jul 10, 2020 at 08:17:52PM +0800, Tian Tao wrote:
> In fact "vmalloc=<size>" cmdline option is not available on many
> platforms.When the user encounters this error, add the correct
> hint to prevent misleading.
i don't think this is an improvement.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] vmalloc: Add the right hint when vmalloc failed
2020-07-10 12:43 ` Matthew Wilcox
@ 2020-07-10 13:49 ` Uladzislau Rezki
2020-07-10 13:53 ` Matthew Wilcox
0 siblings, 1 reply; 5+ messages in thread
From: Uladzislau Rezki @ 2020-07-10 13:49 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: Tian Tao, akpm, linux-mm, linux-kernel, linuxarm
> On Fri, Jul 10, 2020 at 08:17:52PM +0800, Tian Tao wrote:
> > In fact "vmalloc=<size>" cmdline option is not available on many
> > platforms.When the user encounters this error, add the correct
> > hint to prevent misleading.
>
> i don't think this is an improvement.
>
Matthew, maybe it should not be considered as improvements?
It is rather an extra information that indicates that your
ARCH may not support "vmalloc" early parameter.
Thanks!
--
Vlad Rezki
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] vmalloc: Add the right hint when vmalloc failed
2020-07-10 13:49 ` Uladzislau Rezki
@ 2020-07-10 13:53 ` Matthew Wilcox
2020-07-10 14:04 ` Uladzislau Rezki
0 siblings, 1 reply; 5+ messages in thread
From: Matthew Wilcox @ 2020-07-10 13:53 UTC (permalink / raw)
To: Uladzislau Rezki; +Cc: Tian Tao, akpm, linux-mm, linux-kernel, linuxarm
On Fri, Jul 10, 2020 at 03:49:56PM +0200, Uladzislau Rezki wrote:
> > On Fri, Jul 10, 2020 at 08:17:52PM +0800, Tian Tao wrote:
> > > In fact "vmalloc=<size>" cmdline option is not available on many
> > > platforms.When the user encounters this error, add the correct
> > > hint to prevent misleading.
> >
> > i don't think this is an improvement.
> >
> Matthew, maybe it should not be considered as improvements?
Every patch should be an improvement along some dimension. This doesn't
feel like an improvement in any way.
> It is rather an extra information that indicates that your
> ARCH may not support "vmalloc" early parameter.
If anything needs to be improved, it's the documentation, not this
error message.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] vmalloc: Add the right hint when vmalloc failed
2020-07-10 13:53 ` Matthew Wilcox
@ 2020-07-10 14:04 ` Uladzislau Rezki
0 siblings, 0 replies; 5+ messages in thread
From: Uladzislau Rezki @ 2020-07-10 14:04 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Uladzislau Rezki, Tian Tao, akpm, linux-mm, linux-kernel, linuxarm
On Fri, Jul 10, 2020 at 02:53:01PM +0100, Matthew Wilcox wrote:
> On Fri, Jul 10, 2020 at 03:49:56PM +0200, Uladzislau Rezki wrote:
> > > On Fri, Jul 10, 2020 at 08:17:52PM +0800, Tian Tao wrote:
> > > > In fact "vmalloc=<size>" cmdline option is not available on many
> > > > platforms.When the user encounters this error, add the correct
> > > > hint to prevent misleading.
> > >
> > > i don't think this is an improvement.
> > >
> > Matthew, maybe it should not be considered as improvements?
>
> Every patch should be an improvement along some dimension. This doesn't
> feel like an improvement in any way.
>
> > It is rather an extra information that indicates that your
> > ARCH may not support "vmalloc" early parameter.
>
> If anything needs to be improved, it's the documentation, not this
> error message.
>
As i mentioned before, i do not have a strong opinion about this
patch. From the other hand improving that message looks normal
to me. Especially in a context that it took a time to understand
that ARM64 does not support it, so we have had a precedent. I am
talking about author of this patch.
--
Vlad Rezki
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-07-10 14:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10 12:17 [PATCH v3] vmalloc: Add the right hint when vmalloc failed Tian Tao
2020-07-10 12:43 ` Matthew Wilcox
2020-07-10 13:49 ` Uladzislau Rezki
2020-07-10 13:53 ` Matthew Wilcox
2020-07-10 14:04 ` Uladzislau Rezki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.