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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to