linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lib/genalloc.c: include vmalloc.h
@ 2019-01-05 21:21 Olof Johansson
  2019-01-05 21:35 ` Linus Torvalds
  0 siblings, 1 reply; 6+ messages in thread
From: Olof Johansson @ 2019-01-05 21:21 UTC (permalink / raw)
  To: torvalds
  Cc: linux-kernel, Olof Johansson, Huang Shijie, Andrew Morton,
	Alexey Skidanov

Fixes build break on most ARM/ARM64 defconfigs:

lib/genalloc.c: In function 'gen_pool_add_virt':
lib/genalloc.c:190:10: error: implicit declaration of function 'vzalloc_node'; did you mean 'kzalloc_node'?
lib/genalloc.c:190:8: warning: assignment to 'struct gen_pool_chunk *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
lib/genalloc.c: In function 'gen_pool_destroy':
lib/genalloc.c:254:3: error: implicit declaration of function 'vfree'; did you mean 'kfree'?

Fixes: 6862d2fc8185 ('lib/genalloc.c: use vzalloc_node() to allocate the bitmap')
Cc: Huang Shijie <sjhuang@iluvatar.ai>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexey Skidanov <alexey.skidanov@intel.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
---
 lib/genalloc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/genalloc.c b/lib/genalloc.c
index f365d71cdc774..7e85d1e37a6ea 100644
--- a/lib/genalloc.c
+++ b/lib/genalloc.c
@@ -35,6 +35,7 @@
 #include <linux/interrupt.h>
 #include <linux/genalloc.h>
 #include <linux/of_device.h>
+#include <linux/vmalloc.h>
 
 static inline size_t chunk_size(const struct gen_pool_chunk *chunk)
 {
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] lib/genalloc.c: include vmalloc.h
  2019-01-05 21:21 [PATCH] lib/genalloc.c: include vmalloc.h Olof Johansson
@ 2019-01-05 21:35 ` Linus Torvalds
  2019-01-05 21:44   ` Olof Johansson
  2019-01-07 22:56   ` Andrew Morton
  0 siblings, 2 replies; 6+ messages in thread
From: Linus Torvalds @ 2019-01-05 21:35 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Linux List Kernel Mailing, Huang Shijie, Andrew Morton, Alexey Skidanov

On Sat, Jan 5, 2019 at 1:21 PM Olof Johansson <olof@lixom.net> wrote:
>
> Fixes build break on most ARM/ARM64 defconfigs:

Interesting.

Andrew, I thought ARM was one of the platforms that your tree compiled
against? Or was some other change just hiding this?

Anyway, I'll apply as soon as the previous build test finishes.

                   Linus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] lib/genalloc.c: include vmalloc.h
  2019-01-05 21:35 ` Linus Torvalds
@ 2019-01-05 21:44   ` Olof Johansson
  2019-01-07 22:56   ` Andrew Morton
  1 sibling, 0 replies; 6+ messages in thread
From: Olof Johansson @ 2019-01-05 21:44 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Linux List Kernel Mailing, Huang Shijie, Andrew Morton, Alexey Skidanov

On Sat, Jan 5, 2019 at 1:35 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Sat, Jan 5, 2019 at 1:21 PM Olof Johansson <olof@lixom.net> wrote:
> >
> > Fixes build break on most ARM/ARM64 defconfigs:
>
> Interesting.
>
> Andrew, I thought ARM was one of the platforms that your tree compiled
> against? Or was some other change just hiding this?
>
> Anyway, I'll apply as soon as the previous build test finishes.

Looks like the patch might have been queued pretty recently, I don't
see it in the Jan 3 linux-next tree.

I'm not familiar with Andrew's patch queues, but it seems to be there
in the 'mmots' (Jan 4), but not in 'mmotm' (Dec 22).


-Olof



-Olof

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] lib/genalloc.c: include vmalloc.h
  2019-01-05 21:35 ` Linus Torvalds
  2019-01-05 21:44   ` Olof Johansson
@ 2019-01-07 22:56   ` Andrew Morton
  2019-01-10 13:13     ` peter enderborg
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2019-01-07 22:56 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Olof Johansson, Linux List Kernel Mailing, Huang Shijie, Alexey Skidanov

On Sat, 5 Jan 2019 13:35:33 -0800 Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Sat, Jan 5, 2019 at 1:21 PM Olof Johansson <olof@lixom.net> wrote:
> >
> > Fixes build break on most ARM/ARM64 defconfigs:
> 
> Interesting.
> 
> Andrew, I thought ARM was one of the platforms that your tree compiled
> against? Or was some other change just hiding this?
> 

I've become a bit lazy with the cross-compiling because linux-next's
build coverage is pretty broad.  But Stephen's holiday interrupted
things and this one fell in that window.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] lib/genalloc.c: include vmalloc.h
  2019-01-07 22:56   ` Andrew Morton
@ 2019-01-10 13:13     ` peter enderborg
  2019-01-10 23:51       ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: peter enderborg @ 2019-01-10 13:13 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds
  Cc: Olof Johansson, Linux List Kernel Mailing, Huang Shijie, Alexey Skidanov

On 1/7/19 11:56 PM, Andrew Morton wrote:
> On Sat, 5 Jan 2019 13:35:33 -0800 Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
>> On Sat, Jan 5, 2019 at 1:21 PM Olof Johansson <olof@lixom.net> wrote:
>>> Fixes build break on most ARM/ARM64 defconfigs:
>> Interesting.
>>
>> Andrew, I thought ARM was one of the platforms that your tree compiled
>> against? Or was some other change just hiding this?
>>
> I've become a bit lazy with the cross-compiling because linux-next's
> build coverage is pretty broad.  But Stephen's holiday interrupted
> things and this one fell in that window.
>
Is it now OK to use vmalloc in fast path's on all platforms?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] lib/genalloc.c: include vmalloc.h
  2019-01-10 13:13     ` peter enderborg
@ 2019-01-10 23:51       ` Andrew Morton
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2019-01-10 23:51 UTC (permalink / raw)
  To: peter enderborg
  Cc: Linus Torvalds, Olof Johansson, Linux List Kernel Mailing,
	Huang Shijie, Alexey Skidanov

On Thu, 10 Jan 2019 14:13:44 +0100 peter enderborg <peter.enderborg@sony.com> wrote:

> On 1/7/19 11:56 PM, Andrew Morton wrote:
> > On Sat, 5 Jan 2019 13:35:33 -0800 Linus Torvalds <torvalds@linux-foundation.org> wrote:
> >
> >> On Sat, Jan 5, 2019 at 1:21 PM Olof Johansson <olof@lixom.net> wrote:
> >>> Fixes build break on most ARM/ARM64 defconfigs:
> >> Interesting.
> >>
> >> Andrew, I thought ARM was one of the platforms that your tree compiled
> >> against? Or was some other change just hiding this?
> >>
> > I've become a bit lazy with the cross-compiling because linux-next's
> > build coverage is pretty broad.  But Stephen's holiday interrupted
> > things and this one fell in that window.
> >
> Is it now OK to use vmalloc in fast path's on all platforms?

I'd say not.  It is slower than kmalloc and these changes did nothing
to speed it up.

That being said, vmalloc is for "large" memory allocations and large
amounts of memory take large amount of time to utilize, so unless the
code is allocating then freeing memory without using it (don't do that)
then vmalloc() can never be a "fast path" thing?


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-10 23:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-05 21:21 [PATCH] lib/genalloc.c: include vmalloc.h Olof Johansson
2019-01-05 21:35 ` Linus Torvalds
2019-01-05 21:44   ` Olof Johansson
2019-01-07 22:56   ` Andrew Morton
2019-01-10 13:13     ` peter enderborg
2019-01-10 23:51       ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).