All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Dave Airlie <airlied@linux.ie>
Cc: torvalds@linux-foundation.org, hch@lst.de, ak@suse.de, pq@iki.fi,
	jbeulich@novell.com, mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"
Date: Tue, 8 Jan 2008 19:06:11 -0800	[thread overview]
Message-ID: <20080108190611.3b9c0760.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.0.82.0801090226240.9570@skynet.skynet.ie>

On Wed, 9 Jan 2008 02:34:46 +0000 (GMT) Dave Airlie <airlied@linux.ie> wrote:

> 
> [This an initial RFC but I'd like to have this patch in before 2.6.24 goes 
> final as it really breaks this useful feature]
> 
> mmiotrace the MMIO access tracer used to reverse engineer binary blobs
> used this notifier interface and is planned on being pushed upstream.
> 
> Having users able to just use the tracer module without having to rebuild 
> their kernel to add in a page fault handler hack means we get a lot 
> greater coverage for reverse engineering efforts.

Sorry, but that's a really really small benefit.  This very small number of
fairly (or very) technical users will be able to work out a way of getting
this to work in 2.6.24.  And in 2.6.25 with a merged mmiotrace we can do
something different.

It's a modest convenience to a very small number of people.  And the cost? 
Multiple functions calls and multiple cachelines hit for every pagefault
on, what?  Tens of millions of machines?

Plus the code which is getting restored isn't even very good.  For every
pagefault it populates a struct on the stack, passes that around for a
while, does a bit of RCU stuff only to find that there was nothing to do. 
Surely we should at least be doing something along the lines of

	if (unlikely(notify_page_fault_chain.notifier_call != NULL)) {
		all that crap
	}


But that's all speculation.  Has anyone actually measured the pagefault
latency impact of this change?

> +/*
> + * These are only here because kprobes.c wants them to implement a
> + * blatant layering violation.  Will hopefully go away soon once all
> + * architectures are updated.
> + */
> +static inline int register_page_fault_notifier(struct notifier_block *nb)
> +{
> +	return 0;
> +}
> +static inline int unregister_page_fault_notifier(struct notifier_block *nb)
> +{
> +	return 0;
> +}
> +

And this doesn't look very good either.  For how long did this fixme remain
unfixed?


So I'd suggest that we leave things as they are for 2.6.24 - mmiotrace
people will work something out, I'm sure.  For 2.6.25 if we merge mmiotrace
we can look at doing something which is vaguely efficient and tasteful.


  parent reply	other threads:[~2008-01-09  3:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-09  2:34 [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft" Dave Airlie
2008-01-09  2:37 ` Andi Kleen
2008-01-09  3:06 ` Andrew Morton [this message]
2008-01-09  3:17   ` Dave Airlie
2008-01-09  3:29     ` Andrew Morton
2008-01-09  3:55       ` Dave Airlie
2008-01-09  7:19         ` Christoph Hellwig
2008-01-09  7:23           ` David Miller
2008-01-09 10:41             ` Ingo Molnar
2008-01-09 16:52               ` Mathieu Desnoyers
2008-01-09 19:07                 ` Andi Kleen
2008-01-09 20:01               ` Pekka Paalanen
2008-01-09 20:08                 ` Andi Kleen
2008-01-09  4:17       ` Andi Kleen
2008-01-09  9:12       ` Jan Beulich
2008-01-09 15:18     ` Arjan van de Ven
2008-01-09 15:21       ` Andi Kleen
2008-01-09 15:26         ` Ingo Molnar
2008-01-09  7:17 ` Christoph Hellwig
2008-01-09  7:22   ` David Miller
2008-01-09 13:19     ` Jiri Kosina
2008-01-09 13:48       ` David Miller
2008-01-09 14:23     ` Andi Kleen

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=20080108190611.3b9c0760.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=airlied@linux.ie \
    --cc=ak@suse.de \
    --cc=hch@lst.de \
    --cc=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pq@iki.fi \
    --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.