lkml.org 
[lkml]   [2021]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/3] IB/core: Obtain subnet_prefix from cache in IB devices
On Thu, Jun 03, 2021 at 12:20:24PM +0530, Anand Khoje wrote:
> ib_query_port() calls device->ops.query_port() to get the port
> attributes. The method of querying is device driver specific.
> The same function calls device->ops.query_gid() to get the GID and
> extract the subnet_prefix (gid_prefix).
>
> The GID and subnet_prefix are stored in a cache. But they do not get
> read from the cache if the device is an Infiniband device. The
> following change takes advantage of the cached subnet_prefix.
> Testing with RDBMS has shown a significant improvement in performance
> with this change.
>
> The function ib_cache_is_initialised() is introduced because
> ib_query_port() gets called early in the stage when the cache is not
> built while reading port immutable property.
>
> In that case, the default GID still gets read from HCA for IB link-
> layer devices.
>
> Fixes: fad61ad ("IB/core: Add subnet prefix to port info")
> Signed-off-by: Anand Khoje <anand.a.khoje@oracle.com>
> Signed-off-by: Haakon Bugge <haakon.bugge@oracle.com>
> ---
> drivers/infiniband/core/cache.c | 7 ++++++-
> drivers/infiniband/core/device.c | 9 +++++++++
> include/rdma/ib_cache.h | 6 ++++++
> include/rdma/ib_verbs.h | 6 ++++++
> 4 files changed, 27 insertions(+), 1 deletion(-)

Can you please help me to understand how cache is updated?

There are a lot of calls to ib_query_port() and I wonder how callers can
get new GID after it was changed in already initialized cache.

Thanks

\
 
 \ /
  Last update: 2021-06-03 11:08    [W:0.143 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site