From 497817697cfb819824b7ae8619a5094ace1b3698 Mon Sep 17 00:00:00 2001 From: kib Date: Sat, 23 Jun 2012 09:33:06 +0000 Subject: Stop updating the struct vdso_timehands from even handler executed in the scheduled task from tc_windup(). Do it directly from tc_windup in interrupt context [1]. Establish the permanent mapping of the shared page into the kernel address space, avoiding the potential need to sleep waiting for allocation of sf buffer during vdso_timehands update. As a consequence, shared_page_write_start() and shared_page_write_end() functions are not needed anymore. Guess and memorize the pointers to native host and compat32 sysentvec during initialization, to avoid the need to get shared_page_alloc_sx lock during the update. In tc_fill_vdso_timehands(), do not loop waiting for timehands generation to stabilize, since vdso_timehands is written in the same interrupt context which wrote timehands. Requested by: mav [1] MFC after: 29 days --- sys/sys/vdso.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sys/sys/vdso.h') diff --git a/sys/sys/vdso.h b/sys/sys/vdso.h index 9f3f3af..653a606 100644 --- a/sys/sys/vdso.h +++ b/sys/sys/vdso.h @@ -29,7 +29,6 @@ #define _SYS_VDSO_H #include -#include #include struct vdso_timehands { @@ -74,6 +73,8 @@ u_int __vdso_gettc(const struct vdso_timehands *vdso_th); #ifdef _KERNEL +void timekeep_push_vdso(void); + uint32_t tc_fill_vdso_timehands(struct vdso_timehands *vdso_th); /* @@ -86,9 +87,6 @@ uint32_t tc_fill_vdso_timehands(struct vdso_timehands *vdso_th); */ uint32_t cpu_fill_vdso_timehands(struct vdso_timehands *vdso_th); -typedef void (*tc_windup_fn)(void *); -EVENTHANDLER_DECLARE(tc_windup, tc_windup_fn); - #define VDSO_TH_NUM 4 #ifdef COMPAT_FREEBSD32 -- cgit v1.1