> * Jason Baron (
jbaron@redhat.com) wrote:
> > Hi,
> >
> > The first patch uses the storage space of the jump label key address
> > as a pointer into the update table. In this way, we can find all
> > the addresses that need to be updated without hashing.
> >
> > The second patch introduces:
> >
> > static __always_inline bool unlikely_switch(struct jump_label_key *key);
> >
> > instead of the old JUMP_LABEL(key, label) macro.
> >
> > In this way, jump labels become really easy to use:
> >
> > Define:
> >
> > struct jump_label_key jump_key;
> >
> > Can be used as:
> >
> > if (unlikely_switch(&jump_key))
> > do unlikely code
>
> Ah, yes, that's an improvement!
>
> I'm just wondering about the terminology here. Isn't that more a
> "branch" than a "switch" ?
>
> I'm concerned about the fact that if we ever want to use the asm goto
> ability to jump to multiple targets (which is closer to a statically
> computed switch than a branch), we might want to reserve "switch" name
> for that rather than the branch.