lkml.org 
[lkml]   [2019]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: Re: [PATCH v4 6/6] RISC-V: Free-up initrd in free_initrd_mem()
From
Date
Hi,

> On Wed, Feb 13, 2019 at 09:54:15AM -0800, Christoph Hellwig wrote:
> > On Wed, Feb 13, 2019 at 09:38:36AM +0200, Mike Rapoport wrote:
> > > memblock_free() is has no real effect at this point, no idea why arm64
> > > calls it.
> > 
> > Looks like the call was added fairly recently by:
> > 
> > commit 05c58752f9dce11e396676eb731a620541590ed0
> > Author: CHANDAN VN <chandan.vn@samsung.com>
> > Date:   Mon Apr 30 09:50:18 2018 +0530
> > 
> >     arm64: To remove initrd reserved area entry from memblock
> > 
> > which claims it is to work around the initrd being displayed in
> > /sys/kernel/debug/memblock/reserved.
> > 
> > I really think we need to have common behavior there - either do this
> > for all architectures or none.  I've just sent a series that
> > consolidates all but a handful of the free_initrd_mem, so implementing
> > any common behavior on top of that would be good.

> I've just started to look into it today :)
> I'll reply on that thread.

INITRD reserved area entry is not removed from memblock
even though initrd reserved area is freed. The same can be
checked from /sys/kernel/debug/memblock/reserved.
We did not face this issue on arm32 architecture.
Though the changes which i had submitted does not fix any memory leak,
it does make sure that the entries freed from memblock are actually removed
from the sys entry as well.
Also the implementation of arm64 is quite different from arm32. I feel a generic
implementation can be taken up only if its a real necessity.

\
 
 \ /
  Last update: 2019-02-14 06:01    [W:0.067 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site