From: Vlastimil Babka <vbabka@suse.cz>
To: Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-mm <linux-mm@kvack.org>, Borislav Petkov <bp@alien8.de>,
Hugh Dickins <hughd@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Minchan Kim <minchan@kernel.org>, Rik van Riel <riel@redhat.com>,
"Kirill A. Shutemov" <kirill@shutemov.name>,
H Peter Anvin <hpa@zytor.com>, Andi Kleen <andi@firstfloor.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Dave Hansen <dave.hansen@intel.com>, Mel Gorman <mgorman@suse.de>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/3] TLB flush multiple pages per IPI v5
Date: Thu, 25 Jun 2015 21:15:14 +0200 [thread overview]
Message-ID: <558C5342.9020702@suse.cz> (raw)
In-Reply-To: <CA+55aFykFDZBEP+fBeqF85jSVuhWVjL5SW_22FTCMrCeoihauw@mail.gmail.com>
On 25.6.2015 20:36, Linus Torvalds wrote:
>
> On Jun 25, 2015 04:48, "Ingo Molnar" <mingo@kernel.org
> <mailto:mingo@kernel.org>> wrote:
>>
>> - 1x, 2x, 3x, 4x means up to 4 adjacent 4K vmalloc()-ed pages are accessed, the
>> first byte in each
>
> So that test is a bit unfair. From previous timing of Intel TLB fills, I can
> tell you that Intel is particularly good at doing adjacent entries.
>
> That's independent of the fact that page tables have very good locality (if they
> are the radix tree type - the hashed page tables that ppc uses are shit). So
> when filling adjacent entries, you take the cache misses for the page tables
> only once, but even aside from that, Intel send to do particularly well at the
> "next page" TLB fill case
AFAIK that's because they also cache partial translations, so if the first 3
levels are the same (as they mostly are for the "next page" scenario) it will
only have to look at the last level of pages tables. AMD does that too.
> Now, I think that's a reasonably common case, and I'm not saying that it's
> unfair to compare for that reason, but it does highlight the good case for TLB
> walking.
>
> So I would suggest you highlight the bad case too: use invlpg to invalidate
> *one* TLB entry, and then walk four non-adjacent entries. And compare *that* to
> the full TLB flush.
>
> Now, I happen to still believe in the full flush, but let's not pick benchmarks
> that might not show the advantages of the finer granularity.
>
> Linus
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Vlastimil Babka <vbabka@suse.cz>
To: Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-mm <linux-mm@kvack.org>, Borislav Petkov <bp@alien8.de>,
Hugh Dickins <hughd@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Minchan Kim <minchan@kernel.org>, Rik van Riel <riel@redhat.com>,
"Kirill A. Shutemov" <kirill@shutemov.name>,
H Peter Anvin <hpa@zytor.com>, Andi Kleen <andi@firstfloor.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Dave Hansen <dave.hansen@intel.com>, Mel Gorman <mgorman@suse.de>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/3] TLB flush multiple pages per IPI v5
Date: Thu, 25 Jun 2015 21:15:14 +0200 [thread overview]
Message-ID: <558C5342.9020702@suse.cz> (raw)
In-Reply-To: <CA+55aFykFDZBEP+fBeqF85jSVuhWVjL5SW_22FTCMrCeoihauw@mail.gmail.com>
On 25.6.2015 20:36, Linus Torvalds wrote:
>
> On Jun 25, 2015 04:48, "Ingo Molnar" <mingo@kernel.org
> <mailto:mingo@kernel.org>> wrote:
>>
>> - 1x, 2x, 3x, 4x means up to 4 adjacent 4K vmalloc()-ed pages are accessed, the
>> first byte in each
>
> So that test is a bit unfair. From previous timing of Intel TLB fills, I can
> tell you that Intel is particularly good at doing adjacent entries.
>
> That's independent of the fact that page tables have very good locality (if they
> are the radix tree type - the hashed page tables that ppc uses are shit). So
> when filling adjacent entries, you take the cache misses for the page tables
> only once, but even aside from that, Intel send to do particularly well at the
> "next page" TLB fill case
AFAIK that's because they also cache partial translations, so if the first 3
levels are the same (as they mostly are for the "next page" scenario) it will
only have to look at the last level of pages tables. AMD does that too.
> Now, I think that's a reasonably common case, and I'm not saying that it's
> unfair to compare for that reason, but it does highlight the good case for TLB
> walking.
>
> So I would suggest you highlight the bad case too: use invlpg to invalidate
> *one* TLB entry, and then walk four non-adjacent entries. And compare *that* to
> the full TLB flush.
>
> Now, I happen to still believe in the full flush, but let's not pick benchmarks
> that might not show the advantages of the finer granularity.
>
> Linus
>
next prev parent reply other threads:[~2015-06-25 19:15 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 12:50 [PATCH 0/3] TLB flush multiple pages per IPI v5 Mel Gorman
2015-06-08 12:50 ` Mel Gorman
2015-06-08 12:50 ` [PATCH 1/3] x86, mm: Trace when an IPI is about to be sent Mel Gorman
2015-06-08 12:50 ` Mel Gorman
2015-06-08 12:50 ` [PATCH 2/3] mm: Send one IPI per CPU to TLB flush multiple pages that were recently unmapped Mel Gorman
2015-06-08 12:50 ` Mel Gorman
2015-06-08 22:38 ` Andrew Morton
2015-06-08 22:38 ` Andrew Morton
2015-06-09 11:07 ` Mel Gorman
2015-06-09 11:07 ` Mel Gorman
2015-06-08 12:50 ` [PATCH 3/3] mm: Defer flush of writable TLB entries Mel Gorman
2015-06-08 12:50 ` Mel Gorman
2015-06-08 17:45 ` [PATCH 0/3] TLB flush multiple pages per IPI v5 Ingo Molnar
2015-06-08 17:45 ` Ingo Molnar
2015-06-08 18:21 ` Dave Hansen
2015-06-08 18:21 ` Dave Hansen
2015-06-08 19:52 ` Ingo Molnar
2015-06-08 19:52 ` Ingo Molnar
2015-06-08 20:03 ` Ingo Molnar
2015-06-08 20:03 ` Ingo Molnar
2015-06-08 21:07 ` Dave Hansen
2015-06-08 21:07 ` Dave Hansen
2015-06-08 21:50 ` Ingo Molnar
2015-06-08 21:50 ` Ingo Molnar
2015-06-09 8:47 ` Mel Gorman
2015-06-09 8:47 ` Mel Gorman
2015-06-09 10:32 ` Ingo Molnar
2015-06-09 10:32 ` Ingo Molnar
2015-06-09 11:20 ` Mel Gorman
2015-06-09 11:20 ` Mel Gorman
2015-06-09 12:43 ` Ingo Molnar
2015-06-09 12:43 ` Ingo Molnar
2015-06-09 13:05 ` Mel Gorman
2015-06-09 13:05 ` Mel Gorman
2015-06-10 8:51 ` Ingo Molnar
2015-06-10 8:51 ` Ingo Molnar
2015-06-10 9:08 ` Ingo Molnar
2015-06-10 9:08 ` Ingo Molnar
2015-06-10 10:15 ` Mel Gorman
2015-06-10 10:15 ` Mel Gorman
2015-06-11 15:26 ` Ingo Molnar
2015-06-11 15:26 ` Ingo Molnar
2015-06-10 9:19 ` Mel Gorman
2015-06-10 9:19 ` Mel Gorman
2015-06-09 15:34 ` Dave Hansen
2015-06-09 15:34 ` Dave Hansen
2015-06-09 16:49 ` Dave Hansen
2015-06-09 16:49 ` Dave Hansen
2015-06-09 21:14 ` Dave Hansen
2015-06-09 21:14 ` Dave Hansen
2015-06-09 21:54 ` Linus Torvalds
2015-06-09 21:54 ` Linus Torvalds
2015-06-09 22:32 ` Mel Gorman
2015-06-09 22:32 ` Mel Gorman
2015-06-09 22:35 ` Mel Gorman
2015-06-09 22:35 ` Mel Gorman
2015-06-10 13:13 ` Andi Kleen
2015-06-10 13:13 ` Andi Kleen
2015-06-10 16:17 ` Linus Torvalds
2015-06-10 16:17 ` Linus Torvalds
2015-06-10 16:42 ` Linus Torvalds
2015-06-10 16:42 ` Linus Torvalds
2015-06-10 17:24 ` Mel Gorman
2015-06-10 17:24 ` Mel Gorman
2015-06-10 17:31 ` Linus Torvalds
2015-06-10 17:31 ` Linus Torvalds
2015-06-10 18:08 ` Josh Boyer
2015-06-10 18:08 ` Josh Boyer
2015-06-10 17:07 ` Mel Gorman
2015-06-10 17:07 ` Mel Gorman
2015-06-21 20:22 ` Kirill A. Shutemov
2015-06-21 20:22 ` Kirill A. Shutemov
2015-06-25 11:48 ` Ingo Molnar
2015-06-25 11:48 ` Ingo Molnar
2015-06-25 18:36 ` Linus Torvalds
2015-06-25 19:15 ` Vlastimil Babka [this message]
2015-06-25 19:15 ` Vlastimil Babka
2015-06-25 22:04 ` Linus Torvalds
2015-06-25 22:04 ` Linus Torvalds
2015-06-25 18:46 ` Dave Hansen
2015-06-25 18:46 ` Dave Hansen
2015-06-26 9:08 ` Ingo Molnar
2015-06-26 9:08 ` Ingo Molnar
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=558C5342.9020702@suse.cz \
--to=vbabka@suse.cz \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=hpa@zytor.com \
--cc=hughd@google.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=minchan@kernel.org \
--cc=mingo@kernel.org \
--cc=riel@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.