* Write-combining
@ 2002-02-12 14:29 SA products
0 siblings, 0 replies; 6+ messages in thread
From: SA products @ 2002-02-12 14:29 UTC (permalink / raw)
To: linux-kernel
Dear list,
Sorry this maybe off topic-- I am writing a device driver for a kind of
framebuffer device.
This is virtually complete and working, all I wish to add is
write-combining but I can find
very little information on how to do this. Looking at other device
drivers MTRR crops
up a few times but I is still not clear to me what I have to do.
So far-
I grab the memory region for the framebuffer (1/4Mb) something like so;
......
memio=ioremap(pci_resource_start(dev,MEMIO)&PCI_BASE_ADDRESS_MEM_MASK,MEMIO_SIZE);
......
then try to mtrr it
.....
err=mtrr_add(memio,MEMIO_SIZE,MTRR_TYPE_WRCOMB,1);
......
which fails because memio is not aligned correctly
my code generates the following messages
slm: init: mtrr option enabled- trying region cc960000
mtrr: base(0xcc960000) is not aligned on a size(0x40000) boundary
slm: init: mtrr: unable to set write combining for slm memory :(
Before I go any further I would like to ask is this a sensible approach
or have I missed
something somewhere?
If this is not the most sensible way please point me towards a sensible
solution-
If this is the correct way of doing things is there
> an easy way to discover the mtrr alignment requirements prior to
mtrr_add?
> Can I align memio properly (how?) or
> do I start by defining a larger mtrr region below memio and then
masking off the
unwanted regions either side of my memory region with
mtrr(...MTRR_TYPE_WRBACK..)?
> What happens on none x86 type processors?
any other advice?
Thanks SA
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Write-combining
@ 2002-02-12 19:41 SA
0 siblings, 0 replies; 6+ messages in thread
From: SA @ 2002-02-12 19:41 UTC (permalink / raw)
To: linux-kernel
Have I missed something here?
Am I being dim?
Or is the usual "instant advice" feature switched off?
The device I am writing the driver for formally didn't support
write-combining and it took
10000 clock ticks to do a partial transfer- now it does support
write-combining and it still
takes 10000 clock ticks to transfer the data- It is performance
critical- How do I switch
write-combining on? It is worth at least a 2x speed up for me?
If it is something obvious please don't be afraid to point it out-----
Thanks SA
^ permalink raw reply [flat|nested] 6+ messages in thread
* Write-combining
@ 2004-05-11 14:49 Thiago Robert
2004-05-11 15:05 ` Write-combining Sean Neakums
0 siblings, 1 reply; 6+ messages in thread
From: Thiago Robert @ 2004-05-11 14:49 UTC (permalink / raw)
To: linux-kernel
Hello there!
Is there an easy way to be sure about wether the PCI write-combining is
enabled or not for a given memory region?
I'm writting user-level communication software for a Myrinet network. I
use Write PIO and I'm aware that WPIO performance is greatly influencied
by the presence of write combining. Based on the performance I measured
I can only conclude that Write Combining is enabled but I would like to
be sure about it (since I'm planning to publish my research).
Is the default behaviour of the Linux kernel to enable write-combining?
How can I be sure if it is enabled or not?
Thanks in advance.
__________________________
Thiago Robert
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Write-combining
2004-05-11 14:49 Write-combining Thiago Robert
@ 2004-05-11 15:05 ` Sean Neakums
2004-05-11 18:42 ` Write-combining Thiago Robert
0 siblings, 1 reply; 6+ messages in thread
From: Sean Neakums @ 2004-05-11 15:05 UTC (permalink / raw)
To: Thiago Robert; +Cc: linux-kernel
Thiago Robert <robert@inf.ufsc.br> writes:
> Is the default behaviour of the Linux kernel to enable
> write-combining? How can I be sure if it is enabled or not?
My /proc/mtrr lists the following region:
reg03: base=0xf8000000 (3968MB), size= 64MB: write-combining, count=2
which I am guessing is the PCI space, although I'm not certain.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Write-combining
2004-05-11 15:05 ` Write-combining Sean Neakums
@ 2004-05-11 18:42 ` Thiago Robert
0 siblings, 0 replies; 6+ messages in thread
From: Thiago Robert @ 2004-05-11 18:42 UTC (permalink / raw)
To: Sean Neakums; +Cc: linux-kernel
Is anyone certain about this?
Thanks in advance.
_________________________
Thiago Robert
Sean Neakums wrote:
>Thiago Robert <robert@inf.ufsc.br> writes:
>
>
>
>>Is the default behaviour of the Linux kernel to enable
>>write-combining? How can I be sure if it is enabled or not?
>>
>>
>
>My /proc/mtrr lists the following region:
>
>reg03: base=0xf8000000 (3968MB), size= 64MB: write-combining, count=2
>
>which I am guessing is the PCI space, although I'm not certain.
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Write-combining
@ 2004-05-12 18:00 Venkatesan, Ganesh
0 siblings, 0 replies; 6+ messages in thread
From: Venkatesan, Ganesh @ 2004-05-12 18:00 UTC (permalink / raw)
To: Thiago Robert, Sean Neakums; +Cc: linux-kernel
lspci -vvv for your device should display the device specific BARs. If
you see the corresponding BAR in /proc/mtrr display it means that it is
MTRR mapped device memory.
Thanks,
ganesh
-----Original Message-----
From: linux-kernel-owner@vger.kernel.org
[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Thiago Robert
Sent: Tuesday, May 11, 2004 11:43 AM
To: Sean Neakums
Cc: linux-kernel@vger.kernel.org
Subject: Re: Write-combining
Is anyone certain about this?
Thanks in advance.
_________________________
Thiago Robert
Sean Neakums wrote:
>Thiago Robert <robert@inf.ufsc.br> writes:
>
>
>
>>Is the default behaviour of the Linux kernel to enable
>>write-combining? How can I be sure if it is enabled or not?
>>
>>
>
>My /proc/mtrr lists the following region:
>
>reg03: base=0xf8000000 (3968MB), size= 64MB: write-combining, count=2
>
>which I am guessing is the PCI space, although I'm not certain.
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel"
in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
>
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-05-12 18:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-12 19:41 Write-combining SA
-- strict thread matches above, loose matches on Subject: below --
2004-05-12 18:00 Write-combining Venkatesan, Ganesh
2004-05-11 14:49 Write-combining Thiago Robert
2004-05-11 15:05 ` Write-combining Sean Neakums
2004-05-11 18:42 ` Write-combining Thiago Robert
2002-02-12 14:29 Write-combining SA products
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox