Miao Xie
2010-Sep-02 05:46 UTC
[PATCH V2 0/3] improve the performance of some memory copy functions
Changes from V1 to V2: - change the version of GPL from version 2.1 to version 2 When I looked into the performance problem of the btrfs, I found some memory copy functions of the kernel(such as: x86_64''s memmove)is very inefficient, but the glibc version is quite fast, in some cases it is 10 times faster than the kernel version. This patchset introduced some macros and functions of the glibc, and improved memmove and memcpy of the generic version and memmove of x86_64 in the kernel. I have tested this patchset by doing 500 bytes memory copy for 50000 times on x86_64: memmove 2.6.36-rc1 2s 610445us 2.6.36-rc1 + patch 0s 257358us After appling this patchset, the performance of the file creation and deletion on some filesystems also become better. I have tested the file creation and deletion performance with the following benchmark tool on my x86_64 box. http://marc.info/?l=linux-btrfs&m=128212635122920&q=p3 Test steps: # ./creat_unlink 50000 The result is following(Total time): Ext4: 2.6.36-rc1 2.6.36-rc1 + patchset file creation 0.771240 0.698983 9.4%UP file deletion 0.459065 0.425530 7.3%UP Btrfs: 2.6.36-rc1 2.6.36-rc1 + patchset file creation 0.966807 0.947592 1.9%UP file deletion 1.355671 1.217787 10.2%UP BTW: I don''t know the performance of the other architectures because I don''t have the machine of those architectures, so I just improved the generic vesion and x86_64 version. Who can help me to test the performance on the other architectures and compare it with the new generic version?
Ingo Molnar
2010-Sep-02 06:53 UTC
Re: [PATCH V2 0/3] improve the performance of some memory copy functions
* Miao Xie <miaox@cn.fujitsu.com> wrote:> - change the version of GPL from version 2.1 to version 2How were you able to do this? If the code derives from glibc (as your comments in the patches suggest), and if glibc is under the GPL v2.1, then you probably cannot simply change the license to v2. Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Chris Samuel
2010-Sep-02 07:12 UTC
Re: [PATCH V2 0/3] improve the performance of some memory copy functions
On 02/09/10 16:53, Ingo Molnar wrote:> and if glibc is under the GPL v2.1It''s LGPL v2.1 which can be converted to GPL v2 under section 3 of its license. See: http://www.gnu.org/licenses/lgpl-2.1.html cheers, Chris -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Miao Xie
2010-Sep-02 07:17 UTC
Re: [PATCH V2 0/3] improve the performance of some memory copy functions
On Thu, 2 Sep 2010 08:53:47 +0200, Ingo Molnar wrote:> > * Miao Xie<miaox@cn.fujitsu.com> wrote: > >> - change the version of GPL from version 2.1 to version 2 > > How were you able to do this? If the code derives from glibc (as your > comments in the patches suggest), and if glibc is under the GPL v2.1, > then you probably cannot simply change the license to v2.I think we can do it, because the orignal code is under LGPL v2.1, LGPL v2.1 permits us to apply the terms of the ordinary GNU General Public License instead of it. This is the clause of LGPL v2.1: 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. The following is the URL of LGPL v2.1: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html Thanks Miao -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html