From: Rao Shoaib <rao.shoaib@oracle.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-kernel@vger.kernel.org, paulmck@linux.vnet.ibm.com,
brouer@redhat.com, linux-mm@kvack.org
Subject: Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures
Date: Tue, 19 Dec 2017 11:42:35 -0800 [thread overview]
Message-ID: <96438a42-9510-444b-f90e-ed4e12f356c9@oracle.com> (raw)
In-Reply-To: <20171219191222.GA6515@bombadil.infradead.org>
[-- Attachment #1: Type: text/plain, Size: 2010 bytes --]
On 12/19/2017 11:12 AM, Matthew Wilcox wrote:
> On Tue, Dec 19, 2017 at 09:52:27AM -0800, rao.shoaib@oracle.com wrote:
>> This patch updates kfree_rcu to use new bulk memory free functions as they
>> are more efficient. It also moves kfree_call_rcu() out of rcu related code to
>> mm/slab_common.c
>>
>> Signed-off-by: Rao Shoaib <rao.shoaib@oracle.com>
>> ---
>> include/linux/mm.h | 5 ++
>> kernel/rcu/tree.c | 14 ----
>> kernel/sysctl.c | 40 +++++++++++
>> mm/slab.h | 23 +++++++
>> mm/slab_common.c | 198 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
>> 5 files changed, 264 insertions(+), 16 deletions(-)
> You've added an awful lot of code. Do you have any performance measurements
> that shows this to be a win?
I did some micro benchmarking when I was developing the code and did see
performance gains -- see attached.
I tried several networking benchmarks but was not able to get any
improvement . The reason is that these benchmarks do not exercise the
code we are improving. So I looked at the kernel source for users ofA
kfree_rcu().A It turns out that directory deletion code callsA kfree_rcu
to free the data structure when an entry is deleted. Based on that I
created two benchmarks.
1) make_dirs -- This benchmark creates multi level directory structure
and than deletes it. It's the delete partA where we see the performance
gain of about 8.3%. The creation time remains same.
This benchmark was derived from fdtree benchmark at
https://computing.llnl.gov/?set=code&page=sio_downloads ==>
https://github.com/llnl/fdtree
2) tsock -- I also noticed that a socket has an entry in a directory and
when the socket is closed the directory entry is deleted. So I wrote a
simple benchmark that goes in a loop a million times and opens and
closes 10 sockets per iteration. This shows an improvement of 7.6%
I have attached the benchmarks and results. Unchanged results are for
stock kernel, Changed are for the modified kernel.
Shoaib
[-- Attachment #2: make_dirs.tar --]
[-- Type: application/x-tar, Size: 10240 bytes --]
[-- Attachment #3: tsock.tar --]
[-- Type: application/x-tar, Size: 10240 bytes --]
next prev parent reply other threads:[~2017-12-19 19:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-19 17:52 rao.shoaib
2017-12-19 19:12 ` Matthew Wilcox
2017-12-19 19:42 ` Rao Shoaib [this message]
2017-12-19 19:30 ` Matthew Wilcox
2017-12-19 19:56 ` Rao Shoaib
2017-12-19 20:22 ` Paul E. McKenney
2017-12-19 19:33 ` Jesper Dangaard Brouer
2017-12-19 19:33 ` Christopher Lameter
2017-12-19 20:02 ` Rao Shoaib
2017-12-20 0:56 ` Christopher Lameter
2017-12-20 18:14 ` Jesper Dangaard Brouer
2017-12-20 14:17 ` Michal Hocko
2017-12-19 20:41 ` Jesper Dangaard Brouer
2017-12-19 20:56 ` Paul E. McKenney
2017-12-19 21:20 ` Rao Shoaib
2017-12-20 7:31 ` Jesper Dangaard Brouer
2017-12-19 22:12 ` Matthew Wilcox
2017-12-19 23:25 ` Rao Shoaib
2017-12-20 0:20 ` Paul E. McKenney
2017-12-20 1:53 ` Matthew Wilcox
2017-12-20 5:19 ` Paul E. McKenney
2017-12-20 7:06 ` Jesper Dangaard Brouer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=96438a42-9510-444b-f90e-ed4e12f356c9@oracle.com \
--to=rao.shoaib@oracle.com \
--cc=brouer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox