]> git.openfabrics.org - ~shefty/rdma-win.git/commit
[MLX4] Fix ioremap to use consistent caching attribute
authorLeonid Kelly <leonid@mellanox.co.il>
Tue, 14 Sep 2010 09:21:23 +0000 (09:21 +0000)
committerLeonid Kelly <leonid@mellanox.co.il>
Tue, 14 Sep 2010 09:21:23 +0000 (09:21 +0000)
commit6f55e5cb9d91585816b7a6736c0e2c9722758227
tree27ef7dd6bee4a073003cb3334f2d41227202fab4
parent36c630aeb1aef62a45a985eb52b5e7f58ad9cda7
[MLX4] Fix ioremap to use consistent caching attribute

When mapping Blue Flame registers to user-mode, the UAR page is first mapped from I/O space to kernel-mode, then from kernel-mode to user-mode.  The mapping from I/O space uses the function ioremap, which is hard coded to use MmNonCached as the caching attribute.  The subsequent mapping to user-mode specifies MmWriteCombined.  On Windows Server 2008 R2, the memory manager catches the inconsistency and preserves the original MmNonCached attribute.  This leads to a 200-400% regression in small message latencies due to not write combining when writing the request to the blue flame register.

The following patch adds a caching type as a parameter to ioremap, changes all previous callers to specify MmNonCached except in __map_memory_for_user, which already took a caching type, in which case it forwards the caching type to ioremap.

With this patch, small message latency is identical on Windows Server 2008 and Windows Server 2008 R2.

Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2921 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
trunk/hw/mlx4/kernel/bus/ib/main.c
trunk/hw/mlx4/kernel/bus/net/catas.c
trunk/hw/mlx4/kernel/bus/net/cmd.c
trunk/hw/mlx4/kernel/bus/net/eq.c
trunk/hw/mlx4/kernel/bus/net/main.c
trunk/hw/mlx4/kernel/inc/l2w_memory.h