K 10 svn:author V 7 rwatson K 8 svn:date V 27 2011-01-15T19:23:14.658866Z K 7 svn:log V 869 Merge r204494, r204511 from head to stable/8: A first cut at teaching libkvm how to deal with dynamic per-CPU storage (DPCPU): A new API, kvm_dpcpu_setcpu(3), selects the active CPU for the purposes of DPCPU. Calls to kvm_nlist(3) will automatically translate DPCPU symbols and return a pointer to the current CPU's version of the data. Consumers needing to read the same symbol on several CPUs will invoke a series of setcpu/nlist calls, one per CPU of interest. This addition makes it possible for tools like netstat(1) to query the values of DPCPU variables during crashdump analysis, and is based on similar code handling virtualized global variables. Sponsored by: Juniper Networks, Inc. Not all programs including kvm.h include the necessary headers to use u_int, so prefer unsigned int. Pointed out by: bz, kib, Mr Tinderbox END