svn commit: r333755 - head/sys/kern

O. Hartmann ohartmann at walstatt.org
Thu May 17 19:31:58 UTC 2018


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Am Thu, 17 May 2018 19:08:28 +0000 (UTC)
Matt Macy <mmacy at FreeBSD.org> schrieb:

> Author: mmacy
> Date: Thu May 17 19:08:28 2018
> New Revision: 333755
> URL: https://svnweb.freebsd.org/changeset/base/333755
> 
> Log:
>   epoch(9): restore thread priority on exit if it was changed by a waiter
>   
>   Reported by:	markj
>   Approved by:	sbruno
> 
> Modified:
>   head/sys/kern/subr_epoch.c
> 
> Modified: head/sys/kern/subr_epoch.c
> ==============================================================================
> --- head/sys/kern/subr_epoch.c	Thu May 17 19:06:44 2018	(r333754)
> +++ head/sys/kern/subr_epoch.c	Thu May 17 19:08:28 2018	(r333755)
> @@ -290,6 +290,7 @@ epoch_enter_internal(epoch_t epoch, struct thread *td)
>  
>  	INIT_CHECK(epoch);
>  	critical_enter();
> +	td->td_pre_epoch_prio = td->td_priority;
>  	eps = epoch->e_pcpu[curcpu];
>  #ifdef INVARIANTS
>  	MPASS(td->td_epochnest < UCHAR_MAX - 2);
> @@ -326,6 +327,11 @@ epoch_exit_internal(epoch_t epoch, struct thread *td)
>  	TAILQ_REMOVE(&eps->eps_record.er_tdlist, td, td_epochq);
>  	eps->eps_record.er_gen++;
>  	sched_unpin();
> +	if (__predict_false(td->td_pre_epoch_prio != td->td_priority)) {
> +		thread_lock(td);
> +		sched_prio(td, td->td_pre_epoch_prio);
> +		thread_unlock(td);
> +	}
>  	critical_exit();
>  }
>  
> _______________________________________________
> svn-src-head at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe at freebsd.org"


Failure in recent kernel build due to:

[...]
===> acpi/aibs (all)
- --- subr_epoch.o ---
/usr/src/sys/kern/subr_epoch.c:293:6: error: no member named 'td_pre_epoch_prio' in
'struct thread' td->td_pre_epoch_prio = td->td_priority;
        ~~  ^
/usr/src/sys/kern/subr_epoch.c:330:26: error: no member named 'td_pre_epoch_prio' in
'struct thread' if (__predict_false(td->td_pre_epoch_prio != td->td_priority)) {
                            ~~  ^
/usr/src/sys/sys/cdefs.h:455:51: note: expanded from macro '__predict_false'
#define __predict_false(exp)    __builtin_expect((exp), 0)
                                                  ^~~
/usr/src/sys/kern/subr_epoch.c:332:22: error: no member named 'td_pre_epoch_prio' in
'struct thread' sched_prio(td, td->td_pre_epoch_prio);
                               ~~  ^
3 errors generated.
*** [subr_epoch.o] Error code 1


- -- 
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).
-----BEGIN PGP SIGNATURE-----

iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWv3XZAAKCRDS528fyFhY
lMQPAfkBPwmwdD6zM5MLNq8gsXlqlNPA+jXAnk5fBl+8GUZDN+CMnCwkRZRcuEbo
0b4YKC9VNqZjfF9QN5ztyFLxkwEbAf9NMCi5mvYMa2bAFCCjfCtdABdZhloResg7
i5BfvJF5DV4UDMyvRIeMTCUrXKIRsvbyaTwU7oV1tYgpL1Lqt+9p
=5OxY
-----END PGP SIGNATURE-----


More information about the svn-src-head mailing list