From nobody Mon May 30 17:04:19 2022 X-Original-To: dev-commits-src-main@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 9B5AF1B60A07; Mon, 30 May 2022 17:04:20 +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 4LBhb80dnPz4knV; Mon, 30 May 2022 17:04:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653930260; 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=o8oaaBtwcUy25iM9DllPXnHBHnOTGUPFTHF5W88kIb4=; b=X5KBJs/2zDWhLttBJIqOOEJ41lpQ+UGEOCeig6CV6T+UYXwsHnyhTyjcUQyEreCgetxBOi xvZJqcYd+Z8uk4mMd9ZwV4ltrtlS7RABX0B6gK3XLqacgNuxriTTxYIDcKh/6kKbOqxNPz MnIp2DlAXVuBxO37szm5o28nLOqJIyghzybc/tT0JV9oVuH28OIM9iblsZ4wEuvv65tJei lOeR/ACzTnc2LeomWtK9jfTgboPPZZWnQUTJnyWCh9WJG3GHZexYoRDy8v5LwCVX29Sclc OIaUKvXRMNp2unN4YV8izdFEw5VtqtGz1fuPRdF72m3MsOIwqtlAK7o/giNRbw== 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 CF5EB1B3BF; Mon, 30 May 2022 17:04:19 +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 24UH4Jli067828; Mon, 30 May 2022 17:04:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24UH4JxR067827; Mon, 30 May 2022 17:04:19 GMT (envelope-from git) Date: Mon, 30 May 2022 17:04:19 GMT Message-Id: <202205301704.24UH4JxR067827@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: c30a767c6fd6 - main - linux(4): Microoptimize rt_sendsig(), convert signal mask once List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c30a767c6fd6d3f19e897fb800513e75175249b9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653930260; 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=o8oaaBtwcUy25iM9DllPXnHBHnOTGUPFTHF5W88kIb4=; b=lhKYrDR9j4W3IsGcZF7cvHmAANM6cLte2Yh2zHpzLwDnJkwKjPwM4R0x4OygYex5DkhPT2 aKR5fLNRtCYAXHBE9Zuxt32/F8w0nuJKNqysAsFKiXFHO9WWR5bcxaXlKQRlzIGqwRPCom +7HAJcFhfEEJQOGqhHvEPyGvGVhXmKvAuHV22fDtNFGzYlde0zM1w42ZKKqY16VIYJ2zEi uBJdestbTspVNUwg/W1qnXoSQo3skCPSwfqtU3WShP0GxONbcbERNp1jnPYEXZV9iujmPf yyB6lx0TSY7JiVxEMtIsyogmEP5eFI/uPhmxpphTe6TiNa9qDGEWupbKnteBCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653930260; a=rsa-sha256; cv=none; b=uz6E2+sMQ0eaHR+CQ86q+waMmOBEB3XmfEam0XqeCcfv8A0491Fqq2A37qOWpEvHZMwtvR DMjvtUOwVq+3nutiRQC1dsxzdJYzYiF+0WzXjJhNxFmwO8wxz7rzgReBsJnXVQY1CEBDPc wFBUnU2JnYcmbmdBN2U8wVb7HHJ55Raj7S8KqpjWcxRinMlyGA2d7Gh0w91f4LL/9v3v1y UPJmZzoYN40yMKwvLexMVQAs0wEBY21Qr9mbLyx0oCrsPVOHCmf4BJEKhagZq7Rf6riK9Z FztcSnHofxCKPGzxlHlQcik8Q9G6eaF7Qp5vCCbWPQVuNSpffSScNEKKwKMMJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=c30a767c6fd6d3f19e897fb800513e75175249b9 commit c30a767c6fd6d3f19e897fb800513e75175249b9 Author: Dmitry Chagin AuthorDate: 2022-05-30 16:49:45 +0000 Commit: Dmitry Chagin CommitDate: 2022-05-30 16:49:45 +0000 linux(4): Microoptimize rt_sendsig(), convert signal mask once On amd64 Linux saves the thread signal mask in both contexts, in the machine dependent and in the machine independent. Both contexts are user accessible. Convert the mask once, then copy it. MFC after: 2 weeks --- sys/amd64/linux/linux_sysvec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 7aa2cfc1b30e..4cd41b364b95 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -576,7 +576,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) /* Save user context. */ bzero(&sf, sizeof(sf)); bsd_to_linux_sigset(mask, &sf.sf_uc.uc_sigmask); - bsd_to_linux_sigset(mask, &sf.sf_uc.uc_mcontext.sc_mask); + sf.sf_uc.uc_mcontext.sc_mask = sf.sf_uc.uc_sigmask; sf.sf_uc.uc_stack.ss_sp = PTROUT(td->td_sigstk.ss_sp); sf.sf_uc.uc_stack.ss_size = td->td_sigstk.ss_size;