On Thu, Feb 27, 2020 at 09:55:23AM -0500, Dennis Dalessandro wrote: > > > I can just sort the list at the time of insertion of each node. > > > > I'd rather not have to pay the sorting penalty for all users, it seems > > only a few command line tools need the sort > > Should we really go out on limb here and assume it's just a few CLI tools? > What about all the sysadmin type scripts out there? We aren't having a good > track record not breaking user space lately. 'sysadmin scripts' can't view the umad list without going through a cli tool - so sorting the cli tools that show lists of device things will take care of it. verbs is has always been unsorted, so things like ibv_devinfo return in creation order. (which I think is a different random ordering than it used to be) This isn't the first time someone has complated about sorting, I recall there was a complaint about ibv_get_device_list() too, but it was never sorted. It just happened that sometimes it would be sorted by some luck. At least in the umad case it was actually always sorted before. I think we should also sort ibv_devinfo too while we are here. > Is the sorting penalty really going to be that bad? It's not like we will > have a large number of devices that sorting should really be an issue I > wouldn't think. There are configurations where we have a large number of devices. Jason