lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 23 Apr 2007 05:20:47 -0400
From:	Rik van Riel <riel@...hat.com>
To:	Rik van Riel <riel@...hat.com>
CC:	Nick Piggin <nickpiggin@...oo.com.au>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	linux-mm <linux-mm@...ck.org>, shak <dshaks@...hat.com>,
	jakub@...hat.com, drepper@...hat.com
Subject: Re: [PATCH] lazy freeing of memory through MADV_FREE

Use TLB batching for MADV_FREE.  Adds another 10-15% extra performance
to the MySQL sysbench results on my quad core system.

Signed-off-by: Rik van Riel <riel@...hat.com>
---
Rik van Riel wrote:

>> I've added a 5th column, with just your mmap_sem patch and
>> without my madv_free patch.  It is run with the glibc patch,
>> which should make it fall back to MADV_DONTNEED after the
>> first MADV_FREE call fails.

With the attached patch to make MADV_FREE use tlb batching, not
only do we gain an additional 10-15% performance but Nick's
mmap_sem patch also shows the performance increase that we
expected to see.

It looks like the tlb flushes (and IPIs) from zap_pte_range()
could have been the problem.  They're gone now.

The second column from the right has Nick's patch and my own
two patches.  Performance with 16 threads is almost triple what
it used to be...

vanilla   glibc  glibc      glibc        glibc      glibc      glibc
                  madv_free  madv_free               madv_free 
madv_free
                             mmap_sem     mmap_sem   mmap_sem
                                                     tlb batch  tlb_batch
threads

  1     610     609     596         545         534     547     537
  2    1032    1136    1196        1200        1180    1293    1194
  4    1070    1128    2014        2024        2027    2248    2040
  8    1000    1088    1665        2087        2089    2314    1869
  16    779    1073    1310        1999        2012    2214    1557


> Now that I think about it - this is all with the rawhide kernel
> configuration, which has an ungodly number of debug config
> options enabled.
> 
> I should try this with a more normal kernel, on various different
> systems.

This is for another day. :)

First some ebizzy runs...

-- 
Politics is the struggle between those who want to make their country
the best in the world, and those who believe it already is.  Each group
calls the other unpatriotic.

View attachment "linux-2.6-madv_free-lazytlb.patch" of type "text/x-patch" (691 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ