tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Introduce curlwp_bind and curlwp_unbind for psref(9)



Hi,

In order to use psref(9) in a normal LWP context,
we have to ensure the LWP doesn't migrate between
CPUs. To this end, for now we set LP_BOUND to
curlwp->l_pflag.

Currently we do it by open-coding in each place,
but we should provide some API to simplify codes.
riastradh@ suggested curlwp_bind and curlwp_unbind
some time ago (*1) and this patch (*2) just follows
the idea.

(*1) https://mail-index.netbsd.org/tech-kern/2016/02/02/msg020131.html
(*2) http://www.netbsd.org/~ozaki-r/curlwp_bind.diff

Any comments or suggestions to the patch?

Thanks,
  ozaki-r


Home | Main Index | Thread Index | Old Index