LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: benh@kernel.crashing.org
Cc: Christoph Hellwig <hch@infradead.org>,
	Dave Airlie <airlied@gmail.com>, Pekka Paalanen <pq@iki.fi>,
	linux-kernel@vger.kernel.org, jbeulich@novell.com
Subject: Re: Replacement for page fault notifiers?
Date: Wed, 09 Jan 2008 15:24:16 -0500	[thread overview]
Message-ID: <1199910256.11485.14.camel@dv> (raw)
In-Reply-To: <1199908703.6734.133.camel@pasglop>

On Thu, 2008-01-10 at 06:58 +1100, Benjamin Herrenschmidt wrote:
> On Wed, 2008-01-09 at 18:21 +0000, Christoph Hellwig wrote:
> > On Wed, Jan 09, 2008 at 01:18:44PM -0500, Pavel Roskin wrote:
> > > notification without patching the kernel.  But if no such solution is
> > > found, I would also support reverting the patch that removed fault
> > > notifiers on i386.
> > 
> > With your fixation on not patching the kernel you sound like a windows
> > developer.

I just assumed (wrongly, as it seems) that the API change didn't remove
any useful functionality.

Also, I don't want to ask users with unusual hardware to patch their
kernels to take the trace.

> > There is no problem with patching the kernel, but the best
> > patching of that kernel is that which happens upstream so please folks
> > start submitting an mmiotrace variant for kernel inclusion.

The problem is that mmiotrace only makes sense in combination with
non-free drivers, and I'm not sure it would be welcome in the kernel
even if you say so.

The hooks for page faults could be useful for something (debugging, some
non-traditional swap implementations), but I don't want to invent
reasons why somebody else might need them.

> > Then again I don't quite get why you absolutely want to track pagefaults
> > anyway.  Just hooking into ioremap and read*/write* and iomap +
> > ioread*/iowrite* would be much easier and also a lot faster.  It would
> > also allow adding a nice sysfs attribute to enable this per-device.
> 
> Because binary drivers don't use ioread/iowrite/readX/writeX (or if they
> do, they've long been inlined in the blob). The only solution is to map
> things as non-accessible and trap the page faults.

Exactly.  In MadWifi, they are inlined on i386 and x86_64, and I cannot
ask every user with an unsupported card to get a Mac.

> It's a sane thing to do, Christoph, I don't think it's a unreasonable
> request to put the hooks back in.

Seconded.

-- 
Regards,
Pavel Roskin

  parent reply	other threads:[~2008-01-09 20:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-08 19:06 Pekka Paalanen
2008-01-08 20:32 ` Christoph Hellwig
2008-01-08 22:13   ` Dave Airlie
2008-01-09  0:26     ` Benjamin Herrenschmidt
2008-01-09 18:18       ` Pavel Roskin
2008-01-09 18:21         ` Christoph Hellwig
2008-01-09 19:58           ` Benjamin Herrenschmidt
2008-01-09 20:22             ` Christoph Hellwig
2008-01-10  0:42               ` Arjan van de Ven
2008-01-10  0:47                 ` Andi Kleen
2008-01-10  0:55                   ` Arjan van de Ven
2008-01-10  0:58                     ` Benjamin Herrenschmidt
2008-01-10  1:01                     ` Andi Kleen
2008-01-10  0:56                 ` Benjamin Herrenschmidt
2008-01-10  2:03                 ` Matt Mackall
2008-01-10  2:21                   ` Pavel Roskin
2008-01-10  2:30                     ` Matt Mackall
2008-01-10 18:44               ` Pekka Paalanen
2008-01-09 20:24             ` Pavel Roskin [this message]
2008-01-09 20:26               ` Christoph Hellwig
2008-01-09 20:41                 ` Pavel Roskin
2008-01-09 20:44                 ` Valdis.Kletnieks

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=1199910256.11485.14.camel@dv \
    --to=proski@gnu.org \
    --cc=airlied@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=hch@infradead.org \
    --cc=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pq@iki.fi \
    --subject='Re: Replacement for page fault notifiers?' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).