Home | History | Annotate | Download | only in sys
History log of /src/sys/sys/pcu.h
RevisionDateAuthorComments
 1.14  26-Oct-2022  riastradh sys/pcu.h: New home for extern pcu_ops_md_defs.

XXX Should split sys/pcu.h up into the part that sys/lwp.h needs,
which triggers rebuild of entire kernel, and the parts needed only by
subr_pcu.c and by MD FP/SIMD state management logic.
 1.13  16-Mar-2017  chs allow pcu_save() and pcu_discard() to be called on other threads,
ptrace needs to use it that way.
 1.12  16-May-2014  rmind branches: 1.12.4; 1.12.8; 1.12.12;
pcu(9):
- Remove PCU_KERNEL (hi matt!) and significantly simplify the code.
This experimental feature was tried on ARM did not meet the expectations.
It may be revived one day, but it should be done in a much simpler way.
- Add a message structure for xcall function, pass the LWP ower and thus
optimise a race condition: if LWP is discarding its state on a remote CPU,
but another LWP already did it - do not cause an unecessary re-faulting.
- Reduce the variety of flags for PCU operations (only PCU_VALID and
PCU_REENABLE are used now), pass them only to the pcu_state_load().
- Rename pcu_used_p() to pcu_valid_p(); hopefully it is less confusing.
- pcu_save_all_on_cpu: SPL ought to be used here.
- Update and improve the pcu(9) man page; it needs wizd(8) though.
 1.11  22-Aug-2013  drochner branches: 1.11.2;
-extend the pcu(9) API by a function which saves all context on the
current CPU, and use it if a CPU is taken offline
-add a bool argument to pcu_discard which tells whether the internal
"LWP has used the coprocessor" flag should be set or reset. The flag
is reported by pcu_used_p(). If set, future accesses should use the
state stored in the PCB. If reset, it should be reset to default.
The former case is useful for setmcontext().
With that, it should not be necessary anymore to manage the "FPU used"
state by an additional MD variable.

approved by matt
 1.10  26-Dec-2012  matt branches: 1.10.2;
Add support for kernel-based code to use a PCU. (for memory to memory
copies or in_cksum or ...)
 1.9  18-Apr-2012  yamt branches: 1.9.2;
comment
 1.8  06-Jun-2011  matt branches: 1.8.2; 1.8.6;
Add some more MI hook points for PCU. Discard the PCU state at lwp_exit and
at exec time. Before forking, save the PCU state so that cpu_lwp_fork
doesn't have. Remove MD code which did that before.
 1.7  02-May-2011  martin branches: 1.7.2; 1.7.4;
Make it self-contained (add missing stdbool.h include when used for libkvm)
 1.6  02-May-2011  rmind Limit sys/pcu.h inclusion within _KERNEL scope, plus _KMEMUSER.
 1.5  02-May-2011  rmind Extend PCU:
- Add pcu_ops_t::pcu_state_release() operation for PCU_RELEASE case.
- Add pcu_switchpoint() to perform release operation on context switch.
- Sprinkle const, misc. Also, sync MIPS with changes.

Per discussions with matt@.
 1.4  19-Feb-2011  matt branches: 1.4.2; 1.4.4;
Default PCU_UNIT_COUNT to 0. If 0, don't compile the contents of subr_pcu.c
and don't include the pcu related members into struct lwp.
 1.3  17-Feb-2011  rmind Fix sys/pcu.h build breakage.
 1.2  17-Feb-2011  matt Add a bool to pcu_state_save which indicates whether the PCU is going to be
released after the save is done.
 1.1  17-Feb-2011  rmind Add PCU (Per-CPU Unit) - an interface to manage synchronization of any
per CPU context tied with an LWP. Main use - lazy FPU handling on SMP.

Requested by matt@, will be used on mips64. Note: implementation will
be improved to use IPIs before adopting on x86. OK ad@.
 1.4.4.4  12-Jun-2011  rmind sync with head
 1.4.4.3  31-May-2011  rmind sync with head
 1.4.4.2  05-Mar-2011  rmind sync with head
 1.4.4.1  19-Feb-2011  rmind file pcu.h was added on branch rmind-uvmplock on 2011-03-05 20:56:24 +0000
 1.4.2.2  05-Mar-2011  bouyer Sync with HEAD
 1.4.2.1  19-Feb-2011  bouyer file pcu.h was added on branch bouyer-quota2 on 2011-03-05 15:10:51 +0000
 1.7.4.2  06-Jun-2011  jruoho Sync with HEAD.
 1.7.4.1  02-May-2011  jruoho file pcu.h was added on branch jruoho-x86intr on 2011-06-06 09:10:12 +0000
 1.7.2.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.8.6.1  29-Apr-2012  mrg sync to latest -current.
 1.8.2.3  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8.2.2  23-Jan-2013  yamt sync with head
 1.8.2.1  23-May-2012  yamt sync with head.
 1.9.2.3  03-Dec-2017  jdolecek update from HEAD
 1.9.2.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.2.1  25-Feb-2013  tls resync with head
 1.10.2.2  18-May-2014  rmind sync with head
 1.10.2.1  28-Aug-2013  rmind sync with head
 1.11.2.1  10-Aug-2014  tls Rebase.
 1.12.12.1  21-Apr-2017  bouyer Sync with HEAD
 1.12.8.1  20-Mar-2017  pgoyette Sync with HEAD
 1.12.4.1  28-Aug-2017  skrll Sync with HEAD

RSS XML Feed