linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Huang\, Ying" <ying.huang@intel.com>
To: Prathu Baronia <prathu.baronia@oneplus.com>
Cc: <alexander.duyck@gmail.com>,  <chintan.pandya@oneplus.com>,
	 <mhocko@suse.com>,  <akpm@linux-foundation.com>,
	 <linux-mm@kvack.org>,  <gregkh@linuxfoundation.com>,
	 <gthelen@google.com>,  <jack@suse.cz>,  <ken.lin@oneplus.com>,
	 <gasine.xu@oneplus.com>
Subject: Re: [PATCH v2] mm: Optimized hugepage zeroing & copying from user
Date: Mon, 20 Apr 2020 08:18:44 +0800	[thread overview]
Message-ID: <87k12bt3ff.fsf@yhuang-dev.intel.com> (raw)
In-Reply-To: <20200419155856.dtwxomdkyujljdfi@oneplus.com> (Prathu Baronia's message of "Sun, 19 Apr 2020 21:28:57 +0530")

Prathu Baronia <prathu.baronia@oneplus.com> writes:

> The 04/15/2020 11:27, Huang, Ying wrote:
>> 
>> Can you describe your test?
>> 
> We profile the clear_huge_page() using ftrace while parallely force triggering it by a simple
> userspace test code which allocates 100MB of anon memory and traverses through
> it in loop.
>> 
>> You have tested the chunk sizes 4KB and 2MB, can you test some values in
>> between?  For example 32KB or 64KB?  Maybe there's a sweet point with
>> some smaller granularity and good performance.
> Based on your advise I tried chunk sizes of 4KB, 8KB, 16KB, 32KB and 64KB on
> arm64 and x86_64 by copying the kernel memset implementation for both the archs.
> -------------------------------------------------------------------------------
> Results(the sample size is 100 for each and the values are in us):-
> -------------------------------------------------------------------------------
> ARM64(CPU0 & 6 on and set at max frequency, DDR set to performance governor):-
> -------------------------------------------------------------------------------
> Chunk Size = 4KB
> -----------------
> Oneshot
> 	Mean : 3402.06
> 	Stddev : 72.6576
> Forward
> 	Mean : 3408.04
> 	Stddev : 72.976
> Reverse
> 	Mean : 17699.3
> 	Stddev : 132.875
> -----------------
> Chunk Size = 8KB
> -----------------
> Oneshot
> 	Mean : 3398.64
> 	Stddev : 80.6334
> Forward
> 	Mean : 3391.58
> 	Stddev : 65.9063
> Reverse
> 	Mean : 13909.2
> 	Stddev : 194.324
> -----------------
> Chunk Size = 16KB
> -----------------
> Oneshot
> 	Mean : 3393.57
> 	Stddev : 72.2485
> Forward
> 	Mean : 3404.69
> 	Stddev : 84.4705
> Reverse
> 	Mean : 9278.65
> 	Stddev : 217.725
> -----------------
> Chunk Size = 32KB
> -----------------
> Oneshot
> 	Mean : 3425.7
> 	Stddev : 129.156
> Forward
> 	Mean : 3402.07
> 	Stddev : 82.6713
> Reverse
> 	Mean : 6831.43
> 	Stddev : 184.807
> -----------------
> Chunk Size = 64KB
> -----------------
> Oneshot
> 	Mean : 3398.72
> 	Stddev : 77.9703
> Forward
> 	Mean : 3413.52
> 	Stddev : 173.121
> Reverse
> 	Mean : 5542.84
> 	Stddev : 197.017

Maybe a little larger chunk size is good enough for ARM64?

> ---------------------------------------------
> x86_64(Only CPU0 on and set to max frequency)
> ---------------------------------------------
> Chunk Size = 4KB
> -----------------
> Oneshot
> 	Mean : 6752.59
> 	Stddev : 298.988
> Forward
> 	Mean : 6873.6
> 	Stddev : 325.607
> Reverse
> 	Mean : 6722.88
> 	Stddev : 365.837
> -----------------
> Chunk Size = 8KB
> -----------------
> Oneshot
> 	Mean : 6848.57
> 	Stddev : 955.312
> Forward
> 	Mean : 7012.24
> 	Stddev : 1377.27
> Reverse
> 	Mean : 6688.83
> 	Stddev : 589.935
> -----------------
> Chunk Size = 16KB
> -----------------
> Oneshot
> 	Mean : 6846.87
> 	Stddev : 546.173
> Forward
> 	Mean : 6785.26
> 	Stddev : 248.022
> Reverse
> 	Mean : 6613.33
> 	Stddev : 350.003
> -----------------
> Chunk Size = 32KB
> -----------------
> Oneshot
> 	Mean : 6862.19
> 	Stddev : 870.524
> Forward
> 	Mean : 6826.3
> 	Stddev : 870.023
> Reverse
> 	Mean : 6747.69
> 	Stddev : 1047.5
> -----------------
> Chunk Size = 64KB
> -----------------
> Oneshot
> 	Mean : 6806.9
> 	Stddev : 609.112
> Forward
> 	Mean : 6774.53
> 	Stddev : 311.954
> Reverse
> 	Mean : 6553.47
> 	Stddev : 293.52

Per my understanding, X86 cannot benefit anything from the change.

Best Regards,
Huang, Ying


  reply	other threads:[~2020-04-20  0:18 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 15:38 [PATCH v2] mm: Optimized hugepage zeroing & copying from user Prathu Baronia
2020-04-14 17:03 ` Michal Hocko
2020-04-14 17:41   ` Daniel Jordan
     [not found]   ` <20200414184743.GB2097@oneplus.com>
2020-04-14 19:32     ` Alexander Duyck
2020-04-15  3:40       ` Huang, Ying
2020-04-15 11:09         ` Michal Hocko
2020-04-19 12:05       ` Prathu Baronia
2020-04-14 19:40     ` Michal Hocko
2020-04-15  3:27 ` Huang, Ying
2020-04-16  1:21   ` Huang, Ying
2020-04-19 15:58   ` Prathu Baronia
2020-04-20  0:18     ` Huang, Ying [this message]
2020-04-21  9:36       ` Prathu Baronia
2020-04-21 10:09         ` Will Deacon
2020-04-21 12:47           ` Vlastimil Babka
2020-04-21 12:48             ` Vlastimil Babka
2020-04-21 13:39               ` Will Deacon
2020-04-21 13:48                 ` Vlastimil Babka
2020-04-21 13:56                   ` Chintan Pandya
2020-04-22  8:18                   ` Will Deacon
2020-04-22 11:19                     ` Will Deacon
2020-04-22 14:38                       ` Prathu Baronia
2020-05-01  8:58                         ` Prathu Baronia
2020-05-05  8:59                           ` Will Deacon
2020-04-21 13:00             ` Michal Hocko
2020-04-21 13:10               ` Will Deacon
2020-04-17  7:48 ` [mm] 134c8b410f: vm-scalability.median -7.9% regression kernel test robot

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=87k12bt3ff.fsf@yhuang-dev.intel.com \
    --to=ying.huang@intel.com \
    --cc=akpm@linux-foundation.com \
    --cc=alexander.duyck@gmail.com \
    --cc=chintan.pandya@oneplus.com \
    --cc=gasine.xu@oneplus.com \
    --cc=gregkh@linuxfoundation.com \
    --cc=gthelen@google.com \
    --cc=jack@suse.cz \
    --cc=ken.lin@oneplus.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=prathu.baronia@oneplus.com \
    /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;
as well as URLs for NNTP newsgroup(s).