mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
	Dave Airlie <airlied@gmail.com>,
	Keith Packard <keithp@keithp.com>, Dave Airlie <airlied@linux.ie>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: kmap_atomic_pfn for PCI BAR access?
Date: Mon, 7 Jul 2008 21:19:10 +1000	[thread overview]
Message-ID: <200807072119.10831.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <20080707000528.09518481@infradead.org>

On Monday 07 July 2008 17:05, Arjan van de Ven wrote:
> On Mon, 7 Jul 2008 16:53:54 +1000

> > One thing I still haven't implemented in that patch are CPU-local
> > mappings (which only require a local flush to flush)... I found that
> > after the improvements I did implement, they didn't help much for
> > my workloads, so I suspect you might find the same thing...
>
> just to complicate things with ioremap() you have to deal with the
> various caching-coherency requirements.. making things lazy and per CPU
> complicates that a ton (and I suspect won't actually make things
> cheaper)

Yeah, my vmap rewrite has a vm_unmap_aliases() call, which the
page attribute code calls.

But these flushes are not really any different between the atomic
kmap area and my vmap lazy flushing: the atomic kmap code still
has to do a broadcast global TLB flush.

The fact is simply that changing cache attributes is always going
to be an expensive operation and lazy mappings are not going to
really change that -- because changing attributes is going to
require a TLB flush on all CPUs _anyway_, which is the expensive
thing. All we really have to do with lazy mappings is tear down
their page tables before CPA's TLB flush -- if there were no lazy
unmappings in that time, then there will be no extra work to do.

... or, it occurs to me that you might have been referring to
something else: the problem of simply changing the cache attributes
on the pages that you wish to ioremap now. That's going to be slow
sure, but these guys don't seem to need such an attribute change
anyway because they are using kmap_atomic_pfn (which doesn't change
attributes)

  reply	other threads:[~2008-07-07 11:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-23 17:34 Keith Packard
2008-06-26  1:18 ` Jeremy Fitzhardinge
2008-06-26  1:23   ` Dave Airlie
2008-06-26  3:11     ` Jeremy Fitzhardinge
2008-07-07  6:53       ` Nick Piggin
2008-07-07  7:05         ` Arjan van de Ven
2008-07-07 11:19           ` Nick Piggin [this message]
2008-06-26  4:36     ` Arjan van de Ven
2008-06-26  5:02       ` Dave Airlie
2008-06-26  5:33         ` Keith Packard
2008-06-26  5:36       ` Keith Packard
2008-06-26  5:59         ` Jeremy Fitzhardinge
2008-06-26  6:02           ` Dave Airlie
2008-06-26 10:36             ` Arjan van de Ven
2008-06-26 13:02               ` Arjan van de Ven
2008-06-26 10:34         ` Arjan van de Ven

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=200807072119.10831.nickpiggin@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=airlied@gmail.com \
    --cc=airlied@linux.ie \
    --cc=arjan@infradead.org \
    --cc=jeremy@goop.org \
    --cc=keithp@keithp.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®