Thread (5 messages) flat view 5 messages, 3 authors, 2012-08-10

Why the region area don't decrease 1 in function sanity_check_meminfo?

From: 湛振波 <hidden>
Date: 2012-07-24 10:54:30

In this function, have these codes:

/*
		 * Check whether this memory bank would partially overlap
		 * the vmalloc area.
		 */
		if (__va(bank->start + bank->size) > vmalloc_min ||
		    __va(bank->start + bank->size) < __va(bank->start)) {
			unsigned long newsize = vmalloc_min - __va(bank->start);
			printk(KERN_NOTICE "Truncating RAM at %.8llx-%.8llx "
			       "to -%.8llx (vmalloc region overlap).\n",
			       (unsigned long long)bank->start,
			       (unsigned long long)bank->start + bank->size - 1,
			       (unsigned long long)bank->start + newsize - 1);
			bank->size = newsize;
		}

Dear all,


I don't known why the memory region have not decrease 1, i think it
should be decreased(like this , (__va(bank->start + bank->size
-1))because in sparse memory system,  this address bank->start +
bank->size is belong to another bank, so this method is not correctly.

Please indicate whether my understanding is correct.

Thanks.


Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help