From: Andi Kleen <ak@suse.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <ak@suse.de>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Venki Pallipadi <venkatesh.pallipadi@intel.com>,
suresh.b.siddha@intel.com, Arjan van de Ven <arjan@infradead.org>,
Dave Jones <davej@redhat.com>
Subject: Re: CPA patchset
Date: Thu, 10 Jan 2008 13:39:40 +0100 [thread overview]
Message-ID: <20080110123940.GT25945@bingen.suse.de> (raw)
In-Reply-To: <20080110122204.GA25129@elte.hu>
On Thu, Jan 10, 2008 at 01:22:04PM +0100, Ingo Molnar wrote:
>
> * Andi Kleen <ak@suse.de> wrote:
>
> > > What is very real though are the hard limitations of MTRRs. So i'd
> > > rather first like to see a clean PAT approach (which all other
> > > modern OSs have already migrated to in the past 10 years)
> >
> > That's mostly orthogonal. Don't know why you bring it up now?
>
> because the PAT (Page Attribute Table support) patchset and the CPA
> (change_page_attr()) patchset are are not orthogonal at all - as their
> name already signals: because they change the implementation/effects of
> the same interface(s). [just at different levels].
>
> Both patchsets change how the kernel pagetable caching is handled. PAT
> changes the kernel pte details and unshackles us from MTRR reliance and
> thus solves real problems on real boxes:
>
> 55 files changed, 1288 insertions(+), 237 deletions(-)
>
> CPA moves change_page_attr() from invwb flushing to cflush flushing, for
> a speedup/latency-win, plus a whole bunch of intermingled fixes and
> improvements to page attribute modification:
>
> 26 files changed, 882 insertions(+), 423 deletions(-)
>
> so in terms of risk management, the "perfect patch order" is:
>
> - minimal_set of correctness fixes to the highlevel cpa code.
The two clear bug fix patches are refcount and flush order.
refcnt could be moved earlier; flush order would be quite painful
because there are quite a lot of patches dependent on it.
I could move ref count earlier, but I would prefer not to because
of the significant work it would be for me.
Since it is all already bisectable I'm also not sure what debugging
advantages the reordering would be.
It's already bisectable (I have not booted all immediate steps,
but several of them and I believe all compile) and in small pieces for that.
If it's really broken it would need to be reverted and then the ref count
stuff would go too. But I hope that won't be needed.
And even losing the reference count fixes wouldn't be catastrophic -- in the
worst case you lose some minor performance because kernel mappings are
unnecessarily split to 4K pages, but it's not a correctness fix.
So while the reordering would be possible, it would imho not
bring very much advantages and I must admit I'm not too motivated
to do another time-consuming reordering for a relatively weak reason.
If it was a 5 patch series I would probably not complain too much
about this, but it's 25+ patches.
> - ( then any provably NOP cleanups to pave the way. )
>
> - then change the lowlevel pte code (PAT) to reduce/eliminate the need
> to have runtime MTRR use
That's a completely different area really. Most of the PAT code
has nothing to do with clear_page_attr(). Please think that through
again after reading both patchkits.
As far as I can see making it wait for PAT would mean delaying
it for a longer time which would be a pity.
> - then structural improvements/cleanups of the highlevel cpa code
>
> - then the cflush (optional) performance feature ontop of it.
There are actual a lot more performance features in there (self snoop,
minimal TLB flushing some other stuff). Most of it is related to
that in fact.
>
> - then gigabyte-largepages/TLBs support [new CPU feature that further
> complicates page-attribute management]
That's already at the end.
>
> All in an easy-to-revert fashion. We _will_ regress here, and this stuff
That's already the case.
-Andi
prev parent reply other threads:[~2008-01-10 12:39 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-03 15:24 [PATCH CPA] [1/28] Shrink __PAGE_KERNEL/__PAGE_KERNEL_EXEC on non PAE kernels Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [2/28] CPA: Do a simple self test at boot Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [3/28] Add pte accessors for the global bit Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [4/28] Add pte_clrhuge on i386 Andi Kleen
2008-01-05 6:48 ` Jeremy Fitzhardinge
2008-01-03 15:24 ` [PATCH CPA] [5/28] Add pte_pgprot " Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [6/28] CPA: Undo white space changes Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [7/28] Extract page table dumping code from i386 fault handler into dump_pagetable() Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [8/28] CPA: Return the page table level in lookup_address() Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [9/28] CPA: Add simple self test at boot Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [10/28] CPA: Change kernel_map_pages to not use c_p_a() Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [11/28] CPA: Change 32bit back to init_mm semaphore locking Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [12/28] CPA: CLFLUSH support in change_page_attr() Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [13/28] CPA: Use macros to modify the PG_arch_1 page flags in change_page_attr Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [14/28] CPA: Use page granuality TLB flushing " Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [15/28] CPA: Don't flush the caches when the CPU supports self-snoop Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [16/28] CPA: Use wbinvd() macro instead of inline assembly in 64bit c_p_a() Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [17/28] CPA: Reorder TLB / cache flushes to follow Intel recommendation Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [18/28] CPA: Make change_page_attr() more robust against use of PAT bits Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [19/28] CPA: Limit cache flushing to pages that really change caching Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [20/28] CPA: Fix inaccurate comments in 64bit change_page_attr() Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [21/28] CPA: Dump pagetable when inconsistency is detected Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [22/28] CPA: Only queue actually unused page table pages for freeing Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [23/28] CPA: Remove unnecessary masking of address Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [24/28] CPA: Only unmap kernel init pages in text mapping when CONFIG_DEBUG_RODATA is set Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [25/28] CPA: Always do full TLB flush when splitting large pages Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [26/28] CPA: Fix reference counting when changing already changed pages Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [27/28] CPA: Change comments of external interfaces to kerneldoc format Andi Kleen
2008-01-03 15:24 ` [PATCH CPA] [28/28] Make kernel_text test match boot mapping initialization Andi Kleen
2008-01-10 9:31 ` CPA patchset Ingo Molnar
2008-01-10 9:44 ` Dave Airlie
2008-01-10 9:55 ` Andi Kleen
2008-01-10 10:20 ` Dave Airlie
2008-01-10 10:50 ` Andi Kleen
2008-01-10 10:02 ` Ingo Molnar
2008-01-10 9:53 ` Andi Kleen
2008-01-10 10:04 ` Ingo Molnar
2008-01-10 10:07 ` Andi Kleen
2008-01-10 10:57 ` Ingo Molnar
2008-01-10 11:12 ` Andi Kleen
2008-01-11 7:19 ` Ingo Molnar
2008-01-11 7:33 ` Ingo Molnar
2008-01-11 11:28 ` Andi Kleen
2008-01-11 11:26 ` Andi Kleen
2008-01-11 17:02 ` dean gaudet
2008-01-11 17:18 ` Arjan van de Ven
2008-01-11 17:56 ` dean gaudet
2008-01-10 10:43 ` Ingo Molnar
2008-01-10 11:07 ` Andi Kleen
2008-01-10 12:22 ` Ingo Molnar
2008-01-10 12:39 ` Andi Kleen [this message]
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=20080110123940.GT25945@bingen.suse.de \
--to=ak@suse.de \
--cc=arjan@infradead.org \
--cc=davej@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=venkatesh.pallipadi@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