OpenBSD CVS

CVS log for src/sys/sys/percpu.h


[BACK] Up to [local] / src / sys / sys

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.9 / (download) - annotate - [select for diffs], Sat Sep 16 09:33:27 2023 UTC (8 months, 3 weeks ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored)

Allow counters_read(9) to take an optional scratch buffer.

Using a scratch buffer makes it possible to take a consistent snapshot of
per-CPU counters without having to allocate memory.

Makes ddb(4) show uvmexp command work in OOM situations.

ok kn@, mvs@, cheloha@

Revision 1.8 / (download) - annotate - [select for diffs], Tue Aug 28 15:15:02 2018 UTC (5 years, 9 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.7: +12 -1 lines
Diff to previous 1.7 (colored)

Add per-TDB counters and a new SADB extension to export them to
userland.

Inputs from markus@, ok sthen@

Revision 1.7 / (download) - annotate - [select for diffs], Thu Feb 23 00:15:12 2017 UTC (7 years, 3 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

be nicer to 32bit strict alignment archs that can do 64bit loads/stores.

ie, align boot memory to the size of uint64_ts.

there's an argument to be made that we should align this to 16 bytes
to be consistent with malloc and pools.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Feb 5 16:23:38 2017 UTC (7 years, 4 months ago) by jca
Branch: MAIN
Changes since 1.5: +4 -4 lines
Diff to previous 1.5 (colored)

Always allocate counters memory using type M_COUNTERS.

This makes the API simpler, and is probably more useful than spreading
counters memory other several types, making it harder to track.

Prodded by mpi, ok mpi@ stsp@

Revision 1.5 / (download) - annotate - [select for diffs], Tue Dec 20 12:07:14 2016 UTC (7 years, 5 months ago) by bluhm
Branch: MAIN
Changes since 1.4: +2 -1 lines
Diff to previous 1.4 (colored)

Put a write memory barrier into counters_enter().  This ensures
that the generation number increment is written before the function
returns and anything else is written.
OK patrick@ mpi@ dlg@

Revision 1.4 / (download) - annotate - [select for diffs], Mon Nov 14 03:26:31 2016 UTC (7 years, 6 months ago) by dlg
Branch: MAIN
Changes since 1.3: +35 -1 lines
Diff to previous 1.3 (colored)

add wrappers around common operations on counters.

specifically, counters_inc, counters_add, and counters_pkt. the latter
increments both a packet counter and adds to byte counter instead of just
one counter at a time.

part of a bigger diff thats ok mpi@ mikeb@

Revision 1.3 / (download) - annotate - [select for diffs], Mon Oct 24 23:58:33 2016 UTC (7 years, 7 months ago) by dlg
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

avoid using realloc in the name of things that dont work like realloc.

cpumem_realloc and counters_realloc actually allocated new per cpu data
for new cpus, they didnt resize the existing allocation.

specifically, this renames cpumem_reallod to cpumem_malloc_ncpus, and
counters_realloc to counters_alloc_ncpus.

ok (and with some fixes by) bluhm@

Revision 1.2 / (download) - annotate - [select for diffs], Mon Oct 24 03:15:35 2016 UTC (7 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +22 -42 lines
Diff to previous 1.1 (colored)

non-MP vs MP codepaths were confusingly split between the .c and .h file.
Unify these by placing #ifdef MULTIPROCESSOR inside the functions, then
collapse further to reduce _KERNEL blocks
ok dlg

Revision 1.1 / (download) - annotate - [select for diffs], Fri Oct 21 06:27:50 2016 UTC (7 years, 7 months ago) by dlg
Branch: MAIN

add generalised access to per cpu data structures and counters.

both the cpumem and counters api simply allocates memory for each cpu in
the system that can be used for arbitrary per cpu data (via cpumem), or
a versioned set of counters per cpu (counters).

there is an alternate backend for uniprocessor systems that basically
turns the percpu data access into an immediate access to a single
allocation.

there is also support for percpu data structures that are available at
boot time by providing an allocation for the boot cpu. after autoconf,
these allocations have to be resized to provide for all cpus that were
enumerated by boot.

ok mpi@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.