Re: [PATCH] x86: improve algorithm in clflush_cache_range

From: Ingo Molnar
Date: Thu Mar 12 2015 - 07:10:05 EST



* Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx> wrote:

> The current algorithm used in clflush_cache_range() can cause the last
> cache line of the buffer to be flushed twice.
>
> Fix that algorithm so that each cache line will only be flushed once,
> and remove arithmetic on void pointers. Void pointer arithmetic is
> allowed by GCC extensions, but isn't part of the base C standards.

The optimization itself is fine, but that last argument is bogus: the
Linux kernel very much relies on 'void *' arithmetics in a gazillion
places.


Thanks,

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/