All of lore.kernel.org
 help / color / mirror / Atom feed
* kmap_atomic_pfn for PCI BAR access?
@ 2008-06-23 17:34 Keith Packard
  2008-06-26  1:18 ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 16+ messages in thread
From: Keith Packard @ 2008-06-23 17:34 UTC (permalink / raw)
  To: Dave Airlie, linux-kernel; +Cc: keithp

[-- Attachment #1: Type: text/plain, Size: 965 bytes --]

The graphics memory BAR is generally fairly good sized; on Intel chips,
it's between 256M and 1G (and growing). I want to write data into this
region from kernel space, but it's really too big to map the whole thing
into kernel address space, especially on 32-bit systems. ioremap is not
a good option here -- it's way too slow.

With CONFIG_HIGHMEM enabled, I can use kmap_atomic_pfn (well, actually
the kmap_atomic_proc_pfn included in the DRM tree) and things work quite
well -- performance is good, with barely any measurable time spent in
the PTE whacking (~1%).

However, with CONFIG_HIGHMEM disabled, there aren't any PTEs reserved
for this kind of mapping fun. This makes me suspect that abusing
kmap_atomic for this operation would not be appreciated. 

Should I use kmap_atomic_pfn to reach my PCI BAR like this?

Would it be reasonable to supply a patch that made this work even
without CONFIG_HIGHMEM?

-- 
keith.packard@intel.com

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-07-07 11:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-23 17:34 kmap_atomic_pfn for PCI BAR access? 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
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

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.