64bits windows vs. 32bits windows: access to PCIe

Hello,

From what I know, access to DDR is faster with 64bits windows O.S compared to 32bits windows O.S

Is this true also for PCIe memory mapped registers accessed from a device driver ?

Thank you,
Z.V

On Jan 8, 2017, at 7:09 PM, xxxxx@gmail.com wrote:

From what I know, access to DDR is faster with 64bits windows O.S compared to 32bits windows O.S

Where did you read that? I don’t believe it. DDR is hardware. It doesn’t care what the operating system is. There might be some gain in reading a 64-bit word with one instruction instead of two 32-bit reads, but that’s slight.

Is this true also for PCIe memory mapped registers accessed from a device driver ?

No. Even if it were true, so what? It is what it is.

Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Hi Tim,

Here is what I found in:
https://support.microsoft.com/en-us/help/15056/windows-7-32-64-bit-faq#1TC=windows-7

“The benefits of using a 64-bit operating system are most apparent when you have a large amount of random access memory (RAM) installed on your computer, typically 4 GB of RAM or more. In such cases, because a 64-bit operating system can handle large amounts of memory more efficiently than a 32-bit operating system, a 64-bit system can be more responsive when running several programs at the same time and switching between them frequently”

I’m aware 64-bit O.S can handle more than 4GB RAM.

But if I have 2 PCs, both have 3GB RAM, will the 64bit windows in PC-1 work faster that 32bit windows in PC-2 ?

Thank you,
Z.V

Actually, I would bet the 64-bit system with just 3GB would be slower tha the 32-bit syste, with 3GB.

But… it depends on exactly what you mean by “work faster”…

Peter
OSR
@OSRDrivers

On Jan 9, 2017, at 6:05 PM, xxxxx@gmail.com wrote:

Here is what I found in:
https://support.microsoft.com/en-us/help/15056/windows-7-32-64-bit-faq#1TC=windows-7

“The benefits of using a 64-bit operating system are most apparent when you have a large amount of random access memory (RAM) installed on your computer, typically 4 GB of RAM or more. In such cases, because a 64-bit operating system can handle large amounts of memory more efficiently than a 32-bit operating system, a 64-bit system can be more responsive when running several programs at the same time and switching between them frequently”

And you know what that means, right? It means that the 64-bit system can USE that memory beyond 4GB, whereas the 32-bit system can’t. This is NOT saying that 64-bit systems are faster when accessing the same memory.

But if I have 2 PCs, both have 3GB RAM, will the 64bit windows in PC-1 work faster that 32bit windows in PC-2 ?

No. In fact, it works slower, because the average instruction size is larger (because your constants and relocation addresses are twice as big), and that means you can only fit half as many instructions in the caches.

Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

On the other hand, the x64 calling conventions and other ABI improvements might make certain kinds of code run faster

None of this has anything to do with the speed with which data can be read from RAM

Sent from Mailhttps: for Windows 10

From: Tim Robertsmailto:xxxxx
Sent: January 9, 2017 11:32 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: Re: [ntdev] 64bits windows vs. 32bits windows: access to PCIe

On Jan 9, 2017, at 6:05 PM, xxxxx@gmail.com wrote:
>
> Here is what I found in:
> https://support.microsoft.com/en-us/help/15056/windows-7-32-64-bit-faq#1TC=windows-7
>
> “The benefits of using a 64-bit operating system are most apparent when you have a large amount of random access memory (RAM) installed on your computer, typically 4 GB of RAM or more. In such cases, because a 64-bit operating system can handle large amounts of memory more efficiently than a 32-bit operating system, a 64-bit system can be more responsive when running several programs at the same time and switching between them frequently”

And you know what that means, right? It means that the 64-bit system can USE that memory beyond 4GB, whereas the 32-bit system can’t. This is NOT saying that 64-bit systems are faster when accessing the same memory.

> But if I have 2 PCs, both have 3GB RAM, will the 64bit windows in PC-1 work faster that 32bit windows in PC-2 ?

No. In fact, it works slower, because the average instruction size is larger (because your constants and relocation addresses are twice as big), and that means you can only fit half as many instructions in the caches.
?
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:></mailto:xxxxx></mailto:xxxxx></https:>

Hello Tim, Peter,

Thank you very much for your replies.

Best regards,
Z.V

> Is this true also for PCIe memory mapped registers accessed from a device driver ?

The root complex packs memory access requests into PCIe transport layer messages (TLPs or whatever). So if it can pack a 64-bit request in one message instead of two 32-bit messages, there will be performance gain. If you have a PCIe analyzer, look what goes on the bus when you call WRITE_REGISTER_BUFFER_ULONG64 vs. WRITE_REGISTER_BUFFER_ULONG.

– pa

On Jan 11, 2017, at 2:41 PM, xxxxx@fastmail.fm wrote:

> Is this true also for PCIe memory mapped registers accessed from a device driver ?

The root complex packs memory access requests into PCIe transport layer messages (TLPs or whatever). So if it can pack a 64-bit request in one message instead of two 32-bit messages, there will be performance gain. If you have a PCIe analyzer, look what goes on the bus when you call WRITE_REGISTER_BUFFER_ULONG64 vs. WRITE_REGISTER_BUFFER_ULONG.

Many of the root complex controllers are able to combine sequential write cycles into one longer packet, but that doesn’t help on a read.

Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

> Many of the root complex controllers are able to combine sequential write cycles
into one longer packet, but that doesn’t help on a read.

Yes, another iteration of the “write buffer” of PCI era. Reads flush the write buffer. Unfortunately the sniffer is expensive and I don’t have it around all the time. Would like to see trace of READ_REGISTER_BUFFER_ULONG64 vs. READ_REGISTER_BUFFER_ULONG.

– pa