On Wed, Mar 16, 2016 at 12:17:23PM -0500, Christoph Lameter wrote:
On Wed, 16 Mar 2016, Dennis Dalessandro wrote:
> + return sprintf(buf, "%llu\n", stats.value[index]);
> +}
This works fine when there are few counters, but if there are lots? What about
changing things to include the index in the get_protocol_stats() call so that
we just grab the single item we are looking for?
Right now there is a limiting in the source to a max of 128 counters. In
practice all users use less than 30 counters at this point. So we have
some space to go until we may need a better solution. We could also save
the stats we have retrieved so it can be used for multiple counters.
But I think this something for the future.
Fair enough. The only thing I would add is it would be easier now since you
already change the only 2 drivers which use it, and are adding it to the Mlx
drivers for the first time.
Just throwing the idea out. I'm not totally against the current patch.
-Denny
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html