From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750982AbWFXRje (ORCPT ); Sat, 24 Jun 2006 13:39:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750983AbWFXRje (ORCPT ); Sat, 24 Jun 2006 13:39:34 -0400 Received: from mx1.redhat.com ([66.187.233.31]:20369 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S1750980AbWFXRjc (ORCPT ); Sat, 24 Jun 2006 13:39:32 -0400 Date: Sat, 24 Jun 2006 13:39:17 -0400 From: Dave Jones To: Arjan van de Ven Cc: Linux Kernel Mailing List , akpm@osdl.org, torvalds@osdl.org Subject: Re: [PATCH] x86: cache pollution aware __copy_from_user_ll() Message-ID: <20060624173917.GD26273@redhat.com> Mail-Followup-To: Dave Jones , Arjan van de Ven , Linux Kernel Mailing List , akpm@osdl.org, torvalds@osdl.org References: <200606231501.k5NF1B79002899@hera.kernel.org> <1151160152.3181.59.camel@laptopd505.fenrus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1151160152.3181.59.camel@laptopd505.fenrus.org> User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 24, 2006 at 04:42:32PM +0200, Arjan van de Ven wrote: > On Fri, 2006-06-23 at 15:01 +0000, Linux Kernel Mailing List wrote: > > commit c22ce143d15eb288543fe9873e1c5ac1c01b69a1 > > tree dc7d457b8952fc50dfc90df659b35de4117c61fc > > parent 7dbdf43cfa635ddc3701cc8d1eab07597cd731c0 > > author Hiro Yoshioka Fri, 23 Jun 2006 16:04:16 -0700 > > committer Linus Torvalds Fri, 23 Jun 2006 21:42:56 -0700 > > > > [PATCH] x86: cache pollution aware __copy_from_user_ll() > > > > Use the x86 cache-bypassing copy instructions for copy_from_user(). > > > > Some performance data are > > > > Total of GLOBAL_POWER_EVENTS (CPU cycle samples) > > > > 2.6.12.4.orig 1921587 > > 2.6.12.4.nt 1599424 > > 1599424/1921587=83.23% (16.77% reduction) > > Hi, > > while this patch will reduce the number of cycles spent in the kernel, > it's just pushing the cache miss to userspace (by virtue of doing a > cache flush effectively)... is this really the right thing? The total > memory bandwidth will actually increase with this patch if you're > unlucky (eg if userspace decides to write to this memory eventually).... But this is a copy _from_ userspace. The userspace app has likely already brought it into cache before we do the __copy_from_user_ll Dave -- http://www.codemonkey.org.uk