On Mon, 21 Oct 2013 00:12:54 -0400 Doug Ledford <dledf...@redhat.com> wrote:
> I think I like my suggestion better: go back to having a full table, > but use a bitmap to indicate valid entries and then use the bitmap to > limit our comparisons in the find_cached* functions, and put the > get_* funtions back to being O(1). But I would still do that > incrementally from here I think. > > But I'm not totally convinced of that either. The exact sitiation I > listed above, lots of GIDs on an SRIOV PF, makes me concerned that we > can get back to a horrible situation in the find_cached* functions > once we actually have lots of valid entries. It makes me think we > need something better than just a linear search of all valid entries > when you take SRIOV into account. Whether hash chains or ranges or > something to make the lots of valid GIDs case faster, I suspect > something needs to be done, but because things simply aren't in > common use yet we don't know it. Doug, I like your suggestion regarding bitmaps. I would rather hold off on patch #3, though, because as you say, patches 1 and 2 do most of the work and the patch #3 optimization won't do much if the GID table is very populated (which will be the case under SRIOV). I think what you say is correct, a linear search through a populated table will be expensive -- and we need to come up with a better strategy here. ACK for first 2 patches, please hold off on the third. -Jack -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html