From nobody Tue Dec 28 01:07:36 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 73F9E191DA4D; Tue, 28 Dec 2021 01:07:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JNGbs0qbmz3N5r; Tue, 28 Dec 2021 01:07:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE815398; Tue, 28 Dec 2021 01:07:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BS17awq005821; Tue, 28 Dec 2021 01:07:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BS17a95005820; Tue, 28 Dec 2021 01:07:36 GMT (envelope-from git) Date: Tue, 28 Dec 2021 01:07:36 GMT Message-Id: <202112280107.1BS17a95005820@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 23ba59fbfb6a - main - itimers: strip unused bits from struct itimer and struct itimers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23ba59fbfb6ad580c4f185ffea2fa8a32b4d131d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640653657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5vsSa9JTWkS7FXcy2knsMDO6TM1EK09nYMtx1tlGZUw=; b=V5eIu4X2TQ9sc5vY9M2+zcQZOXwuL5InKtVTFmC8HTse4Atx9CVRNZNVDr4DgBnlMV11Am 3Xr5EJxneGdjXczBluyprd5tkeUTCBdacfEYxl36LCzqaURfHizZc0sQpz/C8ohze2KKYy 0JEfht+8W5C14DJiV4EplByynBuIViFoHTwm+aXwsg9KPS1iCzN0yl4s2ECLBSCwv3M+Jx Ak717QNB35/5Zg1KtVuZWbiSzivSNkRB/1YxWfzPF0aBaglpLu0V/imgIb1439yN5npguC cs+4Kohihs+7/vZNpEdBc7/ECSkWuaFhUcuiNrAii0tSx9ocDXeno/th5QGbeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640653657; a=rsa-sha256; cv=none; b=F7yaUuBzjapuEWXeXaBGAzg5OAhKJqmkoLtuPmEAVaGWVAIpWAt/YcsYeWBQnzIzKBI0GQ ZZ1H6SADqr0Y1Lp5S6fi0VUNrMvH1nTeinWROeLG4ypuAwRKstrk9zxSXFbvD7FZnhv4ML fbQ5lN+ejPB2mpXeUWd3OqiGYqBmvfpXkQ+f2FkNnLpHxIj2LLhWkWRcSbzgcKM7G8ZpOZ Ur3+/EW28Sgg4FPT1CMpTU53ROkUrDkfy9068gMR11B8axEcfFDTrStD9mbHyp+OxztV4s /fwSj6H0xWutiapDas3Vj6cUJ1UYLrW0lJZt1dcsYGr98FjKuN6ywLbQv3O3Ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=23ba59fbfb6ad580c4f185ffea2fa8a32b4d131d commit 23ba59fbfb6ad580c4f185ffea2fa8a32b4d131d Author: Konstantin Belousov AuthorDate: 2021-12-27 18:29:22 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-28 01:02:53 +0000 itimers: strip unused bits from struct itimer and struct itimers Reviewed by: imp, markj, mav Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33670 --- sys/kern/kern_time.c | 6 ------ sys/sys/timers.h | 29 +---------------------------- 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 4c53b728a500..74e7c42004ad 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -1266,13 +1266,11 @@ kern_ktimer_create(struct thread *td, clockid_t clock_id, struct sigevent *evp, it = uma_zalloc(itimer_zone, M_WAITOK); it->it_flags = 0; it->it_usecount = 0; - it->it_active = 0; timespecclear(&it->it_time.it_value); timespecclear(&it->it_time.it_interval); it->it_overrun = 0; it->it_overrun_last = 0; it->it_clockid = clock_id; - it->it_timerid = -1; it->it_proc = p; ksiginfo_init(&it->it_ksi); it->it_ksi.ksi_flags |= KSI_INS | KSI_EXT; @@ -1303,7 +1301,6 @@ kern_ktimer_create(struct thread *td, clockid_t clock_id, struct sigevent *evp, goto out; } } - it->it_timerid = id; p->p_itimers->its_timers[id] = it; if (evp != NULL) it->it_sigev = *evp; @@ -1787,9 +1784,6 @@ itimers_alloc(struct proc *p) struct itimers *its; its = malloc(sizeof (struct itimers), M_SUBPROC, M_WAITOK | M_ZERO); - LIST_INIT(&its->its_virtual); - LIST_INIT(&its->its_prof); - TAILQ_INIT(&its->its_worklist); PROC_LOCK(p); if (p->p_itimers == NULL) { p->p_itimers = its; diff --git a/sys/sys/timers.h b/sys/sys/timers.h index 5d6f0c95afa2..9e4597bca21b 100644 --- a/sys/sys/timers.h +++ b/sys/sys/timers.h @@ -56,47 +56,20 @@ struct itimer { int it_overrun; /* Overruns currently accumulating */ int it_overrun_last; /* Overruns associated w/ a delivery */ int it_clockid; - int it_timerid; ksiginfo_t it_ksi; - union { - /* realtime */ - struct { - struct callout it_callout; - } _rt; - - /* cpu timer */ - struct { - LIST_ENTRY(itimer) it_link; - TAILQ_ENTRY(itimer) it_worklink; - int it_active; - int it_cflags; - } _cpu; - } _data; + struct callout it_callout; }; -#define it_callout _data._rt.it_callout -#define it_link _data._cpu.it_link -#define it_active _data._cpu.it_active -#define it_worklink _data._cpu.it_worklink -#define it_cflags _data._cpu.it_cflags - #define ITF_DELETING 0x01 #define ITF_WANTED 0x02 #define ITF_PSTOPPED 0x04 -#define ITCF_ONWORKLIST 0x01 - #define TIMER_MAX 32 #define ITIMER_LOCK(it) mtx_lock(&(it)->it_mtx) #define ITIMER_UNLOCK(it) mtx_unlock(&(it)->it_mtx) -LIST_HEAD(itimerlist, itimer); - struct itimers { - struct itimerlist its_virtual; - struct itimerlist its_prof; - TAILQ_HEAD(, itimer) its_worklist; struct itimer *its_timers[TIMER_MAX]; };