From: Alex Shi <alex.shi@intel.com>
To: Nick Piggin <npiggin@gmail.com>
Cc: Borislav Petkov <bp@amd64.org>,
andi.kleen@intel.com, tim.c.chen@linux.intel.com,
jeremy@goop.org, chrisw@sous-sol.org, akataria@vmware.com,
tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
rostedt@goodmis.org, fweisbec@gmail.com, riel@redhat.com,
luto@mit.edu, avi@redhat.com, len.brown@intel.com,
paul.gortmaker@windriver.com, dhowells@redhat.com,
fenghua.yu@intel.com, yinghai@kernel.org, cpw@sgi.com,
steiner@sgi.com, linux-kernel@vger.kernel.org,
yongjie.ren@intel.com
Subject: Re: [PATCH 2/3] x86/flush_tlb: try flush_tlb_single one by one in flush_tlb_range
Date: Wed, 02 May 2012 21:15:32 +0800 [thread overview]
Message-ID: <4FA13374.8070005@intel.com> (raw)
In-Reply-To: <CAPa8GCDhGfuYEemdsnUZwh=O6Nco1PH1JgiruvWw3400yz9S8w@mail.gmail.com>
On 05/02/2012 09:04 PM, Nick Piggin wrote:
> On 2 May 2012 21:38, Alex Shi <alex.shi@intel.com> wrote:
>> On 05/02/2012 05:38 PM, Borislav Petkov wrote:
>>
>>> On Wed, May 02, 2012 at 05:24:09PM +0800, Alex Shi wrote:
>>>> For some of scenario, above equation can be modified as:
>>>> (512 - X) * 100ns(assumed TLB refill cost) = X * 140ns(assumed invlpg cost)
>
> It should not be that optimistic, because that equation assumes every
> unflushed entry saves a TLB refill too.
>
> I think it is always a good idea to make such fundamental primitives
> cheaper though.
>
>
>>> Also, have you run your patches with other benchmarks beside your
>>> microbenchmark, say kernbench, SPEC<something>, i.e. some other
>>> multithreaded benchmark touching shared memory? Are you seeing any
>>> improvement there?
>>
>>
>> I tested oltp reading and specjbb2005 with openjdk. They should not much
>> flush_tlb_range calling. So, no clear improvement.
>> Do you know benchmarks which cause enough flush_tlb_range?
>
> x86 does not do such invlpg flushing for munmap either, as far as I
> can see?
>
> It would be a little more work to make this happen, but it might show
> more benefit, provided glibc does not free too huge chunks at once,
> it should apply far more often.
Good idea, and it is worthy to try!
But anyway, it is another job. :)
next prev parent reply other threads:[~2012-05-02 13:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-28 8:51 [PATCH 0/3] TLB flush range optimization Alex Shi
2012-04-28 8:51 ` [PATCH 1/3] x86/tlb_info: get last level TLB entry number of CPU Alex Shi
2012-04-29 13:55 ` Borislav Petkov
2012-04-30 4:25 ` Alex Shi
2012-04-30 10:45 ` Borislav Petkov
2012-04-28 8:51 ` [PATCH 2/3] x86/flush_tlb: try flush_tlb_single one by one in flush_tlb_range Alex Shi
2012-04-30 10:54 ` Borislav Petkov
2012-05-02 9:24 ` Alex Shi
2012-05-02 9:38 ` Borislav Petkov
2012-05-02 11:38 ` Alex Shi
2012-05-02 13:04 ` Nick Piggin
2012-05-02 13:15 ` Alex Shi [this message]
2012-05-02 13:24 ` Alex Shi
2012-05-06 2:55 ` Alex Shi
2012-05-02 13:44 ` Borislav Petkov
2012-05-03 9:15 ` Alex Shi
2012-05-04 2:24 ` Ren, Yongjie
2012-05-04 5:46 ` Alex Shi
2012-04-28 8:51 ` [PATCH 3/3] x86/tlb: fall back to flush all when meet a THP large page Alex Shi
-- strict thread matches above, loose matches on Subject: below --
2012-04-28 8:50 [PATCH 1/3] x86/tlb_info: get last level TLB entry number of CPU Alex Shi
2012-04-28 8:50 ` [PATCH 2/3] x86/flush_tlb: try flush_tlb_single one by one in flush_tlb_range Alex Shi
2012-05-02 15:21 ` Rik van Riel
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=4FA13374.8070005@intel.com \
--to=alex.shi@intel.com \
--cc=akataria@vmware.com \
--cc=andi.kleen@intel.com \
--cc=avi@redhat.com \
--cc=bp@amd64.org \
--cc=chrisw@sous-sol.org \
--cc=cpw@sgi.com \
--cc=dhowells@redhat.com \
--cc=fenghua.yu@intel.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@mit.edu \
--cc=mingo@redhat.com \
--cc=npiggin@gmail.com \
--cc=paul.gortmaker@windriver.com \
--cc=riel@redhat.com \
--cc=rostedt@goodmis.org \
--cc=steiner@sgi.com \
--cc=tglx@linutronix.de \
--cc=tim.c.chen@linux.intel.com \
--cc=yinghai@kernel.org \
--cc=yongjie.ren@intel.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