tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Slight tweak to percpu API
> Something about the current percpu API bothers me a little. It
> currently says that callers must disable preemption before calling
> percpu_getptr().
>
> That seems cumbersome. It seems to be the percpu API could do this
> for you. So I've changed the API like so:
>
> - percpu_getptr() is now called percpu_putref() and implicitly
> disables preemption (via crit_enter()) when it is called.
>
> - Added percpu_putref() which implicitly reenables preemption (via
> crit_exit()).
>
> I also updated the only current in-tree user of the percpu API ...
> uipc_mbuf.c.
>
> Attached are the diffs. Any objections?
i did this in the current way so that where preemption is known to be
disabled already (eg. interrupts) you can avoid unnecessary crit_enter/exit
overheads. i don't object against the change. just FYI.
YAMAMOTO Takashi
Home |
Main Index |
Thread Index |
Old Index