[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180324133330.GD25740@localhost.localdomain>
Date: Sat, 24 Mar 2018 21:33:30 +0800
From: Baoquan He <bhe@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: prudo@...ux.vnet.ibm.com, kexec@...ts.infradead.org,
linux-kernel@...r.kernel.org, takahiro.akashi@...aro.org,
ebiederm@...ssion.com, dyoung@...hat.com, vgoyal@...hat.com
Subject: Re: [PATCH 1/2] resource: add walk_system_ram_res_rev()
On 03/23/18 at 01:06pm, Andrew Morton wrote:
> On Fri, 23 Mar 2018 11:10:13 +0800 Baoquan He <bhe@...hat.com> wrote:
>
> > On 03/22/18 at 07:06pm, Andrew Morton wrote:
> > > On Fri, 23 Mar 2018 08:58:45 +0800 Baoquan He <bhe@...hat.com> wrote:
> > >
> > > > > erk, this is pretty nasty. Isn't there a better way :(
> > > >
> > > > Yes, this is not efficient.
> > > >
> > > > In struct resource{}, ->sibling list is a singly linked list. I ever
> > > > thought about changing it to doubly linked list, yet not very sure if
> > > > it will have effect since struct resource is a core data structure.
> > >
> > > Switching to a list_head sounds OK. The only issue really is memory
> > > consumption and surely we don't have tens of thousands of struct
> > > resources floating about(?). Or if we do have a lot, the machine is
> > > presumably huge (hope?).
> >
> > Yes. It doubles the memory consumption.
> >
> > AFAIK, the biggest number of resrouces I heard of possibly is mentioned
> > in this user space kexec_tools commit. In this commit, Xunlei told on
> > SGI system with 64TB RAM, the array which we have been using to store
> > "System RAM"|"Reserved"|"ACPI **" regions is not big enough. In that
> > case, we need extra 8Byte*2048=16KB at most. With my understanding, this
> > increase is system wide, since each resource instance only needs its own
> > list_head member, right?
>
> Yes. That sounds perfectly acceptable.
>
> It would be interesting to see what this approach looks like, if you
> have time to toss something together?
OK, will make patches for reviewing. Thanks!
Powered by blists - more mailing lists