[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180607222646.GX14597@mellanox.com>
Date: Thu, 7 Jun 2018 16:26:46 -0600
From: Jason Gunthorpe <jgg@...lanox.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: hans.westgaard.ry@...cle.com, Doug Ledford <dledford@...hat.com>,
linux-rdma@...r.kernel.org,
HÃ¥kon Bugge <haakon.bugge@...cle.com>,
Parav Pandit <parav@...lanox.com>,
Jack Morgenstein <jackm@....mellanox.co.il>,
Pravin Shedge <pravin.shedge4linux@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC] IB/mad: Use IDR instead of per-port list
On Thu, Jun 07, 2018 at 12:08:32PM -0700, Matthew Wilcox wrote:
>
> Hans reports a bug where the mlx4 driver uses the MSB of the agent number
> to store slave number, meaning we can only use agent numbers up to 2^24.
> Fix this by using an IDR to assign the agent numbers and also look up the
> agent when a MSD packet is received.
>
> I've changed the locking substantially, so this may well have a
> performance issue. There are a few different possibilities for fixing
> that, including moving to an RCU-based lookup.
I do like this better than the last series..
This are is somewhat performance sensitive and it would be nice to
avoid this global lock.
What about using a read/write spinlock instead of the IDR internal
lock? Then all the per-port reading threads calling find_mad_agent can
run concurrently..
Thanks,
Jason
Powered by blists - more mailing lists