All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Theurer <habanero@us.ibm.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>,
	Xen development list <xen-devel@lists.xensource.com>,
	Rolf Neugebauer <rn@acm.org>
Subject: Re: Why is 'emulate' as good as writable PT's?
Date: Thu, 08 Jun 2006 11:05:17 -0500	[thread overview]
Message-ID: <44884ABD.7070103@us.ibm.com> (raw)
In-Reply-To: <b40d0941f5d4c3bd6fc0ad79fc0503d6@cl.cam.ac.uk>

Keir Fraser wrote:
>
> On 6 Jun 2006, at 21:28, Andrew Theurer wrote:
>
>> Yes, we definitely have a problem here.  Tons of flushes with 
>> modified=1, and lots with <=10.  The three benchmarks all seem to hit 
>> the same areas.  Here is the output from running SDET, with snippets 
>> from System.map mixed in:
>
> Is this PAE? SMP guest?
>
> Do you know much about the SDET benchmark? For example, do you know 
> how big the mprotect() calls it makes are likely to be? If vma's are 
> small and fairly sparse then the writable pagetable batching won't be 
> a win.
>
>  -- Keir
>
I was wondering, perhaps we are not just triggering writable pagetables 
when we shouldn't, but maybe we are flushing them back too early.  I 
added some xen perf counters to get an idea of why we are flushing back 
wtpt's (run on SDET again):

                        modified:  0 <=10  <=20  <=30  <=40  <=50
 1 writable pt updates    T=1086   0  612   194   111    49    85
 2 ptwr_flush: called from ptwr_emulated_update because wtpt exists  T=0
 3 ptwr_flush: called from ptwr_do_page_fault because wtpt is already 
used T=338
 4 ptwr_flush: called from spurious_page_fault  T=0
 5 ptwr_flush: called from fixup_page_fault  T=0
 6 ptwr_flush: called from cleanup_wpt, do_mmuext_op (active) T=467
 7 ptwr_flush: called from cleanup_wpt, do_mmuext_op (inactive) T=0
 8 ptwr_flush: called from cleanup_wpt, update_va_mapping (active) T=280
 9 ptwr_flush: called from cleanup_wpt, update_va_mapping (inactive) T=0
10 ptwr_flush: called from cleanup_wpt, do_mmu_update (active) T=1
11 ptwr_flush: called from cleanup_wpt, do_mmu_update (inactive) T=0

line 2:  I don't think we have a choice here, right?  Not a big deal, as 
it's not happening anyway.

line 3:  I think we can just goto emulate instead of flushing back the 
wtpt here, right?  I've tried this, but no real difference in 
performance.  Could we increase the number of wtpt's we keep track of, 
so we don't have to flush back or emulate?

line 6: We seem to call cleanup_writable_pagetables unconditionally 
here, and if either of the active or inactive pages are used, they get 
flushed back.  Do we always need to do this?

line 8: Also call cleanup_writable_pagetables unconditionally here.  Do 
the wtpt's always need this to happen?  Is is possible the 
update_va_mapping call is for an address space which does not affect the 
wtpt?

line 10: Not seeing many flushes here, so I guess it's not an issue.

Sorry if these questions seem odd.  There's a good chance I am not 
"getting it" :)

Thanks,

-Andrew

  parent reply	other threads:[~2006-06-08 16:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-05 22:17 Why is 'emulate' as good as writable PT's? Ian Pratt
2006-06-05 22:29 ` Andrew Theurer
2006-06-06 20:28 ` Andrew Theurer
2006-06-06 21:14   ` Keir Fraser
2006-06-06 22:02     ` Andrew Theurer
2006-06-08 16:05     ` Andrew Theurer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-06-12  9:15 Ian Pratt
2006-06-13 14:47 ` Andrew Theurer
2006-06-05 21:45 Andrew Theurer

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=44884ABD.7070103@us.ibm.com \
    --to=habanero@us.ibm.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=rn@acm.org \
    --cc=xen-devel@lists.xensource.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 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.