mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: nitin.m.gupta@oracle.com
Cc: mike.kravetz@oracle.com, kirill.shutemov@linux.intel.com,
	tom.hromatka@oracle.com, mhocko@suse.com, mingo@kernel.org,
	akpm@linux-foundation.org, steve.capper@arm.com,
	hughd@google.com, punit.agrawal@arm.com, bob.picco@oracle.com,
	pasha.tatashin@oracle.com, steven.sistare@oracle.com,
	paul.gortmaker@windriver.com, thomas.tai@oracle.com,
	atish.patra@oracle.com, sparclinux@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] sparc64: Add 16GB hugepage support
Date: Wed, 26 Jul 2017 13:10:00 -0700 (PDT)	[thread overview]
Message-ID: <20170726.131000.188457155250159722.davem@davemloft.net> (raw)
In-Reply-To: <d2438f2d-87ca-c09a-1891-ed39f4139089@oracle.com>

From: Nitin Gupta <nitin.m.gupta@oracle.com>
Date: Wed, 26 Jul 2017 11:35:28 -0700

> 
> 
> On 07/20/2017 01:04 PM, David Miller wrote:
>> From: Nitin Gupta <nitin.m.gupta@oracle.com>
>> Date: Thu, 13 Jul 2017 14:53:24 -0700
>> 
>>> Testing:
>>>
>>> Tested with the stream benchmark which allocates 48G of
>>> arrays backed by 16G hugepages and does RW operation on
>>> them in parallel.
>> 
>> It would be great if we started adding tests under
>> tools/testing/selftests so that other people can recreate
>> your tests/benchmarks.
>> 
> 
> Yes, I would like to add the stream benchmark to selftests too.
> I will check if our internal version of stream can be released.

That would be great.

>> This macro is getting way out of control, every TLB/TSB miss is
>> going to invoke this sequence of code.
>> 
>> Yes, it's just a two cycle constant load, a test modifying the
>> condition codes, and an easy to predict branch.
>> 
>> But every machine will eat this overhead, even if they don't use
>> hugepages or don't set the 16GB knob.
>> 
>> I think we can do better, using code patching or similar.
>> 
>> Once the knob is set, you can know for sure that this code path
>> will never actually be taken.
> 
> The simplest way I can think of is to add CONFIG_SPARC_16GB_HUGEPAGE
> and exclude PUD check if not enabled.  Would this be okay?

I am saying above to do a run-time code patch.

Kconfig knobs are completely pointless in this kind of situation
since every distribution is going to turn the thing on so essentially
all real users eat the overhead if you do it the Kconfig way.

So do a run-time code patch instead, thank you.

  reply	other threads:[~2017-07-26 20:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1499982815-183450-1-git-send-email-nitin.m.gupta@oracle.com>
2017-07-13 21:53 ` [PATCH 1/3] sparc64: Support huge PUD case in get_user_pages Nitin Gupta
2017-07-13 21:53 ` [PATCH 2/3] sparc64: Add 16GB hugepage support Nitin Gupta
2017-07-20 20:04   ` David Miller
2017-07-26 18:35     ` Nitin Gupta
2017-07-26 20:10       ` David Miller [this message]
2017-07-13 21:53 ` [PATCH 3/3] sparc64: Cleanup hugepage table walk functions Nitin Gupta

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=20170726.131000.188457155250159722.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=akpm@linux-foundation.org \
    --cc=atish.patra@oracle.com \
    --cc=bob.picco@oracle.com \
    --cc=hughd@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.com \
    --cc=mingo@kernel.org \
    --cc=nitin.m.gupta@oracle.com \
    --cc=pasha.tatashin@oracle.com \
    --cc=paul.gortmaker@windriver.com \
    --cc=punit.agrawal@arm.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=steve.capper@arm.com \
    --cc=steven.sistare@oracle.com \
    --cc=thomas.tai@oracle.com \
    --cc=tom.hromatka@oracle.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

all inboxes | Powered by JetHome®