Skip to content

New Caching mechanism for ib_core

Goldwyn Rodrigues linux-rdma 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11Enable bitmaps for valid cache entriesdrivers/infiniband/core/cache.c+24 -20 replies
2/11Get rid of caching function usagedrivers/infiniband/core/cm.c drivers/infiniband/core/cma.c drivers/infiniband/core/device.c +9 more+45 -190 replies
3/11Remove lmc from cachedrivers/infiniband/core/cache.c include/rdma/ib_cache.h include/rdma/ib_verbs.h+1 -430 replies
4/11Use cache structure instead of device (gid)drivers/infiniband/core/cache.c include/rdma/ib_cache.h include/rdma/ib_verbs.h+27 -200 replies
5/11Use cache structure instead of device (pkey)drivers/infiniband/core/cache.c include/rdma/ib_cache.h+22 -190 replies
6/11Add cache update functionsdrivers/infiniband/core/cache.c include/rdma/ib_cache.h+79 -00 replies
7/11Functions to setup and free cachedrivers/infiniband/core/cache.c include/rdma/ib_cache.h+117 -00 replies
8/11Functions to drop cachesdrivers/infiniband/core/cache.c include/rdma/ib_cache.h+41 -00 replies
9/11Remove old cache setup functionsdrivers/infiniband/core/cache.c drivers/infiniband/core/device.c+0 -2030 replies
10/11Remove cache finding functionsdrivers/infiniband/core/cache.c include/rdma/ib_cache.h+0 -1060 replies
11/11mthca: use the new cache in mthca driverdrivers/infiniband/core/cache.c drivers/infiniband/hw/mthca/mthca_av.c drivers/infiniband/hw/mthca/mthca_dev.h +5 more+40 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/11] New Caching mechanism for ib_core

Hi,

This series of patches introduces caching as a library in the ib_core as compared to the previous of implementation as a part of the ib_device calls. Each driver can make use of this by including the ib_cache data structure in the individual device structure. The updation of the cache is the responsibility of the driver, and is best incorporated in the pkey/gid query functions. However, the driver may choose to pre-populate the cache on initialization.

The main motivations are:

1. Greater degree of control by individual drivers. Drivers have a choice to use it or not.
2. The library functions do not sleep, and can be called from any context.

In the bargain we lose the lmc cache. However, if we move it to the device structure like the pkey_tbl_len, it can be accessed directly (TODO). Let me know what you think about it.

I have changed only the mthca driver for now to use this API of the cache. If I get positive comments, I will incorporate it in the rest of the drivers as well. Let me know what you think.

TODO:
Use finer granuality of locking for pkey and gid tables.

Suggestions welcome.

Signature · 5 lines
Goldwyn
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html