linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/3] improve the performance of some memory copy functions
@ 2010-09-02  5:46 Miao Xie
  2010-09-02  6:53 ` Ingo Molnar
  0 siblings, 1 reply; 4+ messages in thread
From: Miao Xie @ 2010-09-02  5:46 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Andrew Morton, Theodore Ts'o,
	Andreas Dilger
  Cc: Linux Kernel, Linux Btrfs, Linux Ext4

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2 0/3] improve the performance of some memory copy functions
  2010-09-02  5:46 [PATCH V2 0/3] improve the performance of some memory copy functions Miao Xie
@ 2010-09-02  6:53 ` Ingo Molnar
  2010-09-02  7:12   ` Chris Samuel
  2010-09-02  7:17   ` Miao Xie
  0 siblings, 2 replies; 4+ messages in thread
From: Ingo Molnar @ 2010-09-02  6:53 UTC (permalink / raw)
  To: Miao Xie
  Cc: Peter Zijlstra, Ingo Molnar, Andrew Morton, Theodore Ts'o,
	Andreas Dilger, Chris Mason, Yan Zheng, Linux Kernel, Linux Btrfs,
	Linux Ext4


* 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.

	Ingo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2 0/3] improve the performance of some memory copy functions
  2010-09-02  6:53 ` Ingo Molnar
@ 2010-09-02  7:12   ` Chris Samuel
  2010-09-02  7:17   ` Miao Xie
  1 sibling, 0 replies; 4+ messages in thread
From: Chris Samuel @ 2010-09-02  7:12 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Miao Xie, Peter Zijlstra, Ingo Molnar, Andrew Morton,
	Theodore Ts'o, Andreas Dilger, Chris Mason, Yan Zheng,
	Linux Kernel, Linux Btrfs, Linux Ext4

On 02/09/10 16:53, Ingo Molnar wrote:

> and if glibc is under the GPL v2.1

It'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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2 0/3] improve the performance of some memory copy functions
  2010-09-02  6:53 ` Ingo Molnar
  2010-09-02  7:12   ` Chris Samuel
@ 2010-09-02  7:17   ` Miao Xie
  1 sibling, 0 replies; 4+ messages in thread
From: Miao Xie @ 2010-09-02  7:17 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Peter Zijlstra, Ingo Molnar, Andrew Morton, Theodore Ts'o,
	Andreas Dilger, Chris Mason, Yan Zheng, Linux Kernel, Linux Btrfs,
	Linux Ext4

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-02  7:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-02  5:46 [PATCH V2 0/3] improve the performance of some memory copy functions Miao Xie
2010-09-02  6:53 ` Ingo Molnar
2010-09-02  7:12   ` Chris Samuel
2010-09-02  7:17   ` Miao Xie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).