Each time a software event triggers, we need to walk throughthe entire list of events from the current cpu and task contextsto retrieve a running perf event that matches.We also need to check a matching perf event is actually counting.

This walk is wasteful and makes the event fast path scalingdown with a growing number of events running on the samecontexts.

To solve this, we store the running perf events in a hashlist toget an immediate access to them against their type:event_id whenthey trigger.

v2: - Fix SWEVENT_HLIST_SIZE definition (and re-learn some basic maths along the way) - Only allocate hlist for online cpus, but keep track of the refcount on offline possible cpus too, so that we allocate it if needed when it becomes online. - Drop the kref use as it's not adapted to our tricks anymore.