summaryrefslogtreecommitdiff
path: root/fs/pnode.c
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2019-12-12 14:30:22 +0300
committerJason Gunthorpe <jgg@mellanox.com>2020-01-08 03:18:10 +0300
commit6b57cea9221b0247ad5111b348522625e489a8e4 (patch)
tree18f23c2313210f83c6ea1b47ffd9c58656d56c28 /fs/pnode.c
parent4cca96a8d9da0ed8217cfdf2aec0c3c8b88e8911 (diff)
downloadlinux-6b57cea9221b0247ad5111b348522625e489a8e4.tar.xz
IB/core: Let IB core distribute cache update events
Currently when the low level driver notifies Pkey, GID, and port change events they are notified to the registered handlers in the order they are registered. IB core and other ULPs such as IPoIB are interested in GID, LID, Pkey change events. Since all GID queries done by ULPs are serviced by IB core, and the IB core deferes cache updates to a work queue, it is possible for other clients to see stale cache data when they handle their own events. For example, the below call tree shows how ipoib will call rdma_query_gid() concurrently with the update to the cache sitting in the WQ. mlx5_ib_handle_event() ib_dispatch_event() ib_cache_event() queue_work() -> slow cache update [..] ipoib_event() queue_work() [..] work handler ipoib_ib_dev_flush_light() __ipoib_ib_dev_flush() ipoib_dev_addr_changed_valid() rdma_query_gid() <- Returns old GID, cache not updated. Move all the event dispatch to a work queue so that the cache update is always done before any clients are notified. Fixes: f35faa4ba956 ("IB/core: Simplify ib_query_gid to always refer to cache") Link: https://lore.kernel.org/r/20191212113024.336702-3-leon@kernel.org Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Reviewed-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'fs/pnode.c')
0 files changed, 0 insertions, 0 deletions