Messages in this thread |  | | | Subject | Re: [PATCH] /proc/cpumem | | Date | Thu, 17 Feb 2005 09:17:15 +0900 | | From | YAMAMOTO Takashi <> |
| |
hi,
> + while (addr < end) { > + if (valid_phys_addr_range(addr, &size)) { > + if (!found) { > + found = 1; > + p->addr = addr; > + p->size = size; > + } else { > + p->size += size; > + } > + addr += size; > + size = 0xf0000000; > + } else { > + if (found) { > + return p; > + } > + addr += PAGE_SIZE; > + } > + }
doesn't this loop take very long time if you have a large hole?
i'd suggest to change valid_phys_addr_range to fill &size even when it returns false, so that caller can skip the hole efficiently.
YAMAMOTO Takashi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |