1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

altq: mark callouts as mpsafe

There's no reason to acquire the Giant lock while executing the ALTQ
callouts.

While here also remove a few backwards compatibility defines for long
obsolete FreeBSD versions.

Reviewed by:	mav
Suggested by:	mav
Differential Revision:	https://reviews.freebsd.org/D31835
This commit is contained in:
Kristof Provost 2021-09-04 14:18:45 +02:00
parent 7b81e6c7ca
commit 312f5f8a4f
2 changed files with 2 additions and 11 deletions

View File

@ -908,9 +908,7 @@ EVENTHANDLER_DEFINE(cpufreq_post_change, tsc_freq_changed, NULL,
static void
init_machclk_setup(void)
{
#if (__FreeBSD_version >= 600000)
callout_init(&tbr_callout, 0);
#endif
callout_init(&tbr_callout, 1);
machclk_usepcc = 1;

View File

@ -164,16 +164,9 @@ typedef u_long ioctlcmd_t;
/* use callout */
#include <sys/callout.h>
#if (__FreeBSD_version > 500000)
#define CALLOUT_INIT(c) callout_init((c), 0)
#else
#define CALLOUT_INIT(c) callout_init((c))
#endif
#define CALLOUT_INIT(c) callout_init((c), 1)
#define CALLOUT_RESET(c,t,f,a) callout_reset((c),(t),(f),(a))
#define CALLOUT_STOP(c) callout_stop((c))
#if !defined(CALLOUT_INITIALIZER) && (__FreeBSD_version < 600000)
#define CALLOUT_INITIALIZER { { { NULL } }, 0, NULL, NULL, 0 }
#endif
#define m_pktlen(m) ((m)->m_pkthdr.len)