kmap_atomic_pfn for PCI BAR access?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Dave Airlie <airlied@...>, linux-kernel <linux-kernel@...>
Cc: <keithp@...>
Date: Monday, June 23, 2008 - 1:34 pm

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.=20

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?

--=20
keith.packard@intel.com
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
kmap_atomic_pfn for PCI BAR access?, Keith Packard, (Mon Jun 23, 1:34 pm)
Re: kmap_atomic_pfn for PCI BAR access?, Jeremy Fitzhardinge, (Wed Jun 25, 9:18 pm)
Re: kmap_atomic_pfn for PCI BAR access?, Dave Airlie, (Wed Jun 25, 9:23 pm)
Re: kmap_atomic_pfn for PCI BAR access?, Arjan van de Ven, (Thu Jun 26, 12:36 am)
Re: kmap_atomic_pfn for PCI BAR access?, Keith Packard, (Thu Jun 26, 1:36 am)
Re: kmap_atomic_pfn for PCI BAR access?, Arjan van de Ven, (Thu Jun 26, 6:34 am)
Re: kmap_atomic_pfn for PCI BAR access?, Jeremy Fitzhardinge, (Thu Jun 26, 1:59 am)
Re: kmap_atomic_pfn for PCI BAR access?, Dave Airlie, (Thu Jun 26, 2:02 am)
Re: kmap_atomic_pfn for PCI BAR access?, Arjan van de Ven, (Thu Jun 26, 6:36 am)
Re: kmap_atomic_pfn for PCI BAR access?, Arjan van de Ven, (Thu Jun 26, 9:02 am)
Re: kmap_atomic_pfn for PCI BAR access?, Dave Airlie, (Thu Jun 26, 1:02 am)
Re: kmap_atomic_pfn for PCI BAR access?, Keith Packard, (Thu Jun 26, 1:33 am)
Re: kmap_atomic_pfn for PCI BAR access?, Jeremy Fitzhardinge, (Wed Jun 25, 11:11 pm)
Re: kmap_atomic_pfn for PCI BAR access?, Nick Piggin, (Mon Jul 7, 2:53 am)
Re: kmap_atomic_pfn for PCI BAR access?, Arjan van de Ven, (Mon Jul 7, 3:05 am)
Re: kmap_atomic_pfn for PCI BAR access?, Nick Piggin, (Mon Jul 7, 7:19 am)