From nobody Sun Jan 02 19:08:06 2022 X-Original-To: dev-commits-src-branches@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 E8AA7191F239; Sun, 2 Jan 2022 19:08:06 +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 4JRpLG4m2nz4XmH; Sun, 2 Jan 2022 19:08:06 +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 848C31763A; Sun, 2 Jan 2022 19:08:06 +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 202J86iW057614; Sun, 2 Jan 2022 19:08:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 202J86oE057613; Sun, 2 Jan 2022 19:08:06 GMT (envelope-from git) Date: Sun, 2 Jan 2022 19:08:06 GMT Message-Id: <202201021908.202J86oE057613@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 0af1cbb038a1 - stable/13 - itimers: strip unused bits from struct itimer and struct itimers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 0af1cbb038a11a2734afbc120c3d46adb836ee4f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641150486; 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=u33aG5D8xEpICb923MepNy41/5yA4VyIqsuTOs7+ndY=; b=GlgmyHOnhBOjgemHjxRl5jjcjfhII3LEVIUPJseMcwWvAQcvXDCDXfE27+eUlYu5jOQ/+k 9BsFHQ+fkPE0d5sbqzNrRf9VvjG4f6zqhSSUK06euKEH8xp5q/l8SzZyK0CpiJeqaCHsMI QmV6rbCYISscES/cF7m7jWtaf2VLEQY1xrmGYppVDFWPGWdps8LSG3CVldCRzelfPuRSG1 vpKDO6MnyscZsSXktMIScm43Y82XJk6ADjl7YzPIEqllEkGpasHnPDpNlxeLo2NyNjkZv/ 0TjfSm8rT5y59g6Ry9jRDIBxyrrOX4yhgJrQ/n5cu7lDIOGvbS6z+oLLoicsDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641150486; a=rsa-sha256; cv=none; b=mHoap9n5ozeoZceT6iHVAMYkLM/cIelkpoEt4YA547+w6imUryk8cOH0TfQbvKLODKZhqT 4XRLc4x+I/FxQLhg8O7yO7PdFHrt1FcX5/EDcFd7fHJKof7XfLD4gkitSPvOaz12EoGmFI Oxcr0KnwHqufbSRSuyI34aiyXdbMgPn4ew5H2mRgKI1oYMuKoXJaetNm+lu2RbReBcHgDh nAw/68HqiSgR0p82JiEtgL83TLwGOBf5LTWVk0Y01NV8+ckhu4iwKYazVtCjSqH5VX6Wat bF5Ay0FpdT3SP9NmZbvSfk0O2nKyrKGI0BF7OhXPGwWlrMyRZT6ocg+Gio8rlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0af1cbb038a11a2734afbc120c3d46adb836ee4f commit 0af1cbb038a11a2734afbc120c3d46adb836ee4f Author: Konstantin Belousov AuthorDate: 2021-12-27 18:29:22 +0000 Commit: Konstantin Belousov CommitDate: 2022-01-02 16:43:00 +0000 itimers: strip unused bits from struct itimer and struct itimers (cherry picked from commit 23ba59fbfb6ad580c4f185ffea2fa8a32b4d131d) --- 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]; };