summaryrefslogtreecommitdiffstats
path: root/lib/libkvm/kvm_pcpu.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge r261796 from head:glebius2014-03-041-2/+12
| | | | | | | | While it isn't too late and kvm_read_zpcpu() function isn't yet used outside libkvm(3), change its order of arguments, so that it is the same as in kvm_read(). Merge r261805 from head: Add kvm_getncpus() to obtain mp_ncpus.
* o Provide function kvm_read_zpcpu() to access UMA_ZONE_PCPU allocations.glebius2013-04-101-3/+48
| | | | | | o Provide function kvm_counter_u64_fetch() to fetch valut of a counter(9). Sponsored by: Nginx, Inc.
* With retirement of cpumask_t and usage of cpuset_t for representing aattilio2011-07-041-29/+2
| | | | | | | | | | | | | | | mask of CPUs, pc_other_cpus and pc_cpumask become highly inefficient. Remove them and replace their usage with custom pc_cpuid magic (as, atm, pc_cpumask can be easilly represented by (1 << pc_cpuid) and pc_other_cpus by (all_cpus & ~(1 << pc_cpuid))). This change is not targeted for MFC because of struct pcpu members removal and dependency by cpumask_t retirement. MD review by: marcel, marius, alc Tested by: pluknet MD testing by: marcel, marius, gonzo, andreast
* Revert r222363, as bde@ pointed out the initial solution was far moreattilio2011-05-311-1/+1
| | | | correct.
* Style fix: cast to size_t rather than u_long when comparing to sizeof()attilio2011-05-271-1/+1
| | | | | | rets. Requested by: kib
* In the near future cpuset_t objects in struct pcpu will be axed out, butattilio2011-05-271-2/+29
| | | | | | | | as long as this does not happen, we need to fix interfaces to userland in order to not break run-time accesses to the structure. Reviwed by: kib Tested by: pluknet
* libkvm code janitoringuqs2011-01-231-11/+10
| | | | | | | | | | | | - make WARNS=6 clean for archs w/o strict alignment requirments - add const, ANSIfy, remove unused vars, cast types for comparison - thanks to differing definitions of VM_MIN_ADDRESS across our archs, we need to trick the compiler to not complain about signedness. We could either fix VM_MIN_ADDRESS to always be a simple integer or make the check conditional on $ARCH. Closes PRs: kern/42386, kern/83364 Reviewed by: bde
* Similar to sys/net/vnet.h, define the linker set name for sys/sys/pcpu.hdim2010-11-141-2/+2
| | | | as a macro, and use it instead of literal strings.
* A first cut at teaching libkvm how to deal with dynamic per-CPU storagerwatson2010-03-011-0/+140
| | | | | | | | | | | | | | | | | (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. MFC after: 1 week Sponsored by: Juniper Networks, Inc.
* Add two new routines to libkvm for working with per-CPU data:jhb2008-08-191-0/+152
kvm_getmaxcpu() and kvm_getpcpu(). MFC after: 1 week
OpenPOWER on IntegriCloud