Re: [PATCH 2/2] x86: mtrr_cleanup try gran_size to less than 1M

From: Ingo Molnar
Date: Fri Oct 03 2008 - 03:38:59 EST



* Yinghai Lu <yinghai@xxxxxxxxxx> wrote:

> > boundary handling may have problem...
>
> can you try
>
> diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
> index ef64128..70beb13 100644
> --- a/arch/x86/kernel/cpu/mtrr/main.c
> +++ b/arch/x86/kernel/cpu/mtrr/main.c
> @@ -1044,7 +1044,7 @@ second_try:
> hole_sizek = range0_sizek - state->range_sizek - second_sizek;
>
> /* hole size should be less than half of range0 size */
> - if (hole_sizek > (range0_sizek >> 1) &&
> + if (hole_sizek >= (range0_sizek >> 1) &&
> range0_sizek >= chunk_sizek) {

applied to tip/x86/mtrr, thanks Yinghai!

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