From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 26 Jun 2002 08:58:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 26 Jun 2002 08:58:23 -0400 Received: from ns.suse.de ([213.95.15.193]:5384 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id ; Wed, 26 Jun 2002 08:58:23 -0400 Date: Wed, 26 Jun 2002 14:58:22 +0200 From: Andi Kleen To: Dave Jones , Niels Christiansen , Andrew Morton , Linux Kernel Mailing List , lse-tech@lists.sourceforge.net Subject: Re: [Lse-tech] Re: efficient copy_to_user and copy_from_user routines in Linux Kernel Message-ID: <20020626145822.A18581@wotan.suse.de> References: <3D18A26A.73E6DD07@zip.com.au> <026f01c21c7a$3b3df820$fad88842@ribald.com> <20020625211127.B15184@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020625211127.B15184@suse.de> User-Agent: Mutt/1.3.22.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 25, 2002 at 09:11:27PM +0200, Dave Jones wrote: > On Tue, Jun 25, 2002 at 01:58:01PM -0500, Niels Christiansen wrote: > > > Maybe it is time to see if the compiler has improved enough to > > scrap the copy code in the kernel in favor of code as generated by the > > compiler. > > This came up about a month ago. I'll repeat what I said then. > "I'll believe it when I see it". Just look at the x86-64 port (2.5) The code generated by gcc 3.1 is a lot better than the inline macros. For example it knows the alignment of target/source and emits unrolled big (4,2,1bytes) moves and some tricks. We're using that on x86-64. For tricky cases (it cannot determine length or alignment) it'll still call out to out of line functions, which should be optimized, notably not just use rep ; s... like the inline macros which isn't very efficient on Athlon. -Andi