Re: [PATCH] memory hotadd fixes [4/5] avoid check in acpi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 03 Aug 2006 20:00:08 -0700
keith mannthey <[email protected]> wrote:


> > >   What protecting is there for calling add_memory on an already present
> > > memory range?  
> > > 
> > For example, considering ia64, which has 1Gbytes section...
> 
> Maybe 1gb sections is too large?  
> 
ia64 machines sometimes to have crazy big memory...so 1gb section is requested.
Configurable section_size for small machines was rejected in old days.


> > hot add following region.
> > ==
> > (A) 0xc0000000 - 0xd7ffffff  (section 3)
> > (B) 0xe0000000 - 0xffffffff  (section 3)
> > ==
> > (A) and (B) will go to the same section, but there is a memory hole between
> > (A) and (B). Considering memory (B) appears after (A) in DSDT.
> > 
> > After add_memory() against (A) is called, section 3 is ready.
> > Then, pfn_valid(0xe0000000) and pfn_valid(0xffffffff) returns true because
> > they are in section 3.
> > So, checking pfn_valid() for (B) will returns true and memory (B) cannot be
> > added. ioresouce collision check will help this situation.
> 
> With iommus out there throwing aliment all off way the flexability is
> good. 
> 
> My question is this.
> 
> Assuming 0-0xbfffffff is present.
> 
> What keeps 0xa0000000 to 0xa1000000 from being re-onlined by a bad call
> to add_memory?

Usual sparsemem's add_memory() checks whether there are sections in
sparse_add_one_section(). then add_pages() returns -EEXIST (nothing to do).
And ioresouce collision check will finally find collision because 0-0xbffffff
resource will conflict with 0xa0000000 to 0xa10000000 area.
But, x86_64 's (not sparsemem) add_pages() doen't do collision check, so it panics.
I posted patch to catch collision before calling arch_add_memory(), I think it will
help x86_64 users. and no-re-online.

-Kame


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux