From: Andreas Dilger Subject: Re: [PATCH 2/3] lib: improve the performance of memcpy and memmove of the general version Date: Fri, 3 Sep 2010 12:16:57 -0600 Message-ID: References: <4C7E2CAC.6080102@cn.fujitsu.com> <82mxrzrsvq.fsf@mid.bfk.de> Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8BIT Cc: miaox@cn.fujitsu.com, Ingo Molnar , Andrew Morton , Chris Mason , Theodore Ts'o , Linux Kernel , Linux Btrfs , Linux Ext4 To: Florian Weimer Return-path: Received: from [64.59.134.9] ([64.59.134.9]:54700 "EHLO idcmail-mo2no.shaw.ca" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1756948Ab0ICSRJ convert rfc822-to-8bit (ORCPT ); Fri, 3 Sep 2010 14:17:09 -0400 In-Reply-To: <82mxrzrsvq.fsf@mid.bfk.de> Sender: linux-ext4-owner@vger.kernel.org List-ID: On 2010-09-03, at 05:03, Florian Weimer wrote: > * Miao Xie: > >> EXPORT_SYMBOL(memcpy); > > I think you need to change that to EXPORT_SYMBOL_GPL, because the code > is now licensed under the GPL, and not the GPL plus kernel exceptions > (whatever they are, but they undoubtly exist), unlike the original > implementation. Ouch. That would basically make it impossible to implement a non-GPL module. Also, this should only apply to the "lib" version of the memcpy() routine, not the arch-specific ones that are written in assembly (maybe that already is true, I'm not sure). Lustre is GPL, so it isn't fatal for us, but it definitely seems draconian, and almost a reason not to include this patch into the kernel. Also, given that the original code is LGPL (which allows linking to non-GPL code) this seems counter to the intent of the original authors. I suspect there isn't anything so brilliant in the glibc memcpy() that it couldn't be re-implemented without copying the code. "implement memcpy with aligned machine-word-sized chunks" would be enough for anyone to reimplement it without ever having come close to the glibc code. Cheers, Andreas