All of lore.kernel.org
 help / color / mirror / Atom feed
* Query about merging memblock and bootmem into one new alloc
@ 2015-12-19 13:57 Sumit Gupta
  2015-12-21 17:24 ` Laura Abbott
  0 siblings, 1 reply; 5+ messages in thread
From: Sumit Gupta @ 2015-12-19 13:57 UTC (permalink / raw)
  To: inux-mm, linux-kernel, linux-arch

Hi All,

For ARM Linux, during booting first memblock reserves memory regions
then bootmem allocator create node, mem_map, page bitmap data and then
hands over to buddy.
I have been thinking from some time about why we need two different
allocators for this.
Can we merge both into one(memblock into bootmem) or create a new
allocator which can speed up the same thing which is easy to enhance
in future.
I am not sure about this and whether it's good idea or will it be fruitful.

Please suggest and share your opinion.

Thank you in advance for your help.

Regards,
Sumit Gupta

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

* Re: Query about merging memblock and bootmem into one new alloc
  2015-12-19 13:57 Query about merging memblock and bootmem into one new alloc Sumit Gupta
@ 2015-12-21 17:24 ` Laura Abbott
  2015-12-21 22:01   ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Laura Abbott @ 2015-12-21 17:24 UTC (permalink / raw)
  To: Sumit Gupta, inux-mm, linux-kernel, linux-arch

On 12/19/2015 05:57 AM, Sumit Gupta wrote:
> Hi All,
>
> For ARM Linux, during booting first memblock reserves memory regions
> then bootmem allocator create node, mem_map, page bitmap data and then
> hands over to buddy.
> I have been thinking from some time about why we need two different
> allocators for this.
> Can we merge both into one(memblock into bootmem) or create a new
> allocator which can speed up the same thing which is easy to enhance
> in future.
> I am not sure about this and whether it's good idea or will it be fruitful.
>
> Please suggest and share your opinion.
>
> Thank you in advance for your help.
>

ARM no longer uses bootmem, just memblock (see 84f452b1e8fc73ac0e31254c66e3e2260ce5263d
ARM: mm: Remove bootmem code and switch to NO_BOOTMEM). Any bootmem calls
just go to mm/nobootmem.c which is a wrapper around memblock for compatibility.

Thanks,
Laura



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

* Re: Query about merging memblock and bootmem into one new alloc
  2015-12-21 17:24 ` Laura Abbott
@ 2015-12-21 22:01   ` Arnd Bergmann
  2015-12-22  9:47     ` Sam Ravnborg
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2015-12-21 22:01 UTC (permalink / raw)
  To: Laura Abbott; +Cc: Sumit Gupta, inux-mm, linux-kernel, linux-arch

On Monday 21 December 2015, Laura Abbott wrote:
> ARM no longer uses bootmem, just memblock (see 84f452b1e8fc73ac0e31254c66e3e2260ce5263d
> ARM: mm: Remove bootmem code and switch to NO_BOOTMEM). Any bootmem calls
> just go to mm/nobootmem.c which is a wrapper around memblock for compatibility.

It seems the same is true on arc, arm64, powerpc, s390, sparc, tile and x86,
and we'd ideally move all others the same way.

Almost all uses of the bootmem interfaces are in architectures specific code
these days, the only exceptions I could find at all are alloc_bootmem_pages
in drivers/xen/swiotlb-xen.c, and alloc_bootmem in drivers/macintosh/smu.c
and init/main.c.

I don't know how the effort to remove bootmem is progressing, but I guess
we could avoid adding new users if we move the existing implementation into
the architectures that still use it, remove the interfaces not used by
those architectures and rename the other ones to have a prefix identifying
the architecture.

	Arnd

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

* Re: Query about merging memblock and bootmem into one new alloc
  2015-12-21 22:01   ` Arnd Bergmann
@ 2015-12-22  9:47     ` Sam Ravnborg
  0 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2015-12-22  9:47 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Laura Abbott, Sumit Gupta, inux-mm, linux-kernel, linux-arch

On Mon, Dec 21, 2015 at 11:01:01PM +0100, Arnd Bergmann wrote:
> On Monday 21 December 2015, Laura Abbott wrote:
> > ARM no longer uses bootmem, just memblock (see 84f452b1e8fc73ac0e31254c66e3e2260ce5263d
> > ARM: mm: Remove bootmem code and switch to NO_BOOTMEM). Any bootmem calls
> > just go to mm/nobootmem.c which is a wrapper around memblock for compatibility.
> 
> It seems the same is true on arc, arm64, powerpc, s390, sparc, tile and x86,
> and we'd ideally move all others the same way.

Small detail - sparc64 uses memblock, whereas sparc32 uses bootmem.

I know because I once tried to move sparc32 to use memblock, but
ran out of time.

	Sam

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

* Query about merging memblock and bootmem into one new alloc
@ 2015-12-19 13:40 Sumit Gupta
  0 siblings, 0 replies; 5+ messages in thread
From: Sumit Gupta @ 2015-12-19 13:40 UTC (permalink / raw)
  To: linux-mm, linux-kernel, mm-commits, linux-arch

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

Hi All,

For ARM Linux, during booting first memblock reserves memory regions then
bootmem allocator create node, mem_map, page bitmap data and then hands
over to buddy.
I have been thinking from some time about why we need two different
allocators for this.
Can we merge both into one(memblock into bootmem) or create a new allocator
which can speed up the same thing which is easy to enhance in future.
I am not sure about this and whether it's good idea or will it be fruitful.

Please suggest and share your opinion.

Thank you in advance for your help.


-- 
Thanks & Regards,
Sumit Gupta
Mob: +91-9717222038

[-- Attachment #2: Type: text/html, Size: 830 bytes --]

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

end of thread, other threads:[~2015-12-22  9:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-19 13:57 Query about merging memblock and bootmem into one new alloc Sumit Gupta
2015-12-21 17:24 ` Laura Abbott
2015-12-21 22:01   ` Arnd Bergmann
2015-12-22  9:47     ` Sam Ravnborg
  -- strict thread matches above, loose matches on Subject: below --
2015-12-19 13:40 Sumit Gupta

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.