From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755221AbbCMCAc (ORCPT ); Thu, 12 Mar 2015 22:00:32 -0400 Received: from mga14.intel.com ([192.55.52.115]:15576 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754576AbbCMCA2 (ORCPT ); Thu, 12 Mar 2015 22:00:28 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,391,1422950400"; d="scan'208";a="664603057" Message-ID: <1426212026.14865.2.camel@theros.lm.intel.com> Subject: Re: [PATCH] x86: improve algorithm in clflush_cache_range From: Ross Zwisler To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , x86@kernel.org, Dan Williams , Borislav Petkov Date: Thu, 12 Mar 2015 20:00:26 -0600 In-Reply-To: <20150312110950.GA8475@gmail.com> References: <1426107899-27933-1-git-send-email-ross.zwisler@linux.intel.com> <20150312110950.GA8475@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20.rez) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-03-12 at 12:09 +0100, Ingo Molnar wrote: > * Ross Zwisler 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. Okay. Are you happy with the patch as is or would you like me to resubmit with that bit omitted from the change log? - Ross