From nobody Thu Jul 25 23:11:27 2024 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 4WVRTW46dfz5RW41; Thu, 25 Jul 2024 23:11:27 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WVRTW3dlhz4XMG; Thu, 25 Jul 2024 23:11:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721949087; 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=lD3FwVxx/+oMx4dVtN7awTD+MMr5SQqNvSvLqcbzUu4=; b=cGuot9U7Qfiix00z0d7fXC9jjhL51moLxvV78TSYy3dUHh8PtzpLADo0GnLZ6CmO66Y6xh dJzfgx99jkSOE02pFYIg4w2O1Fmlgi5D+8CGlKzIJk5KG+sjUQhhOuKOnotV0Q+P8KwZuv vVlnmkmW+7eIVhkbK75zPIN/03kZ//tGiIBumTnlj0WchpubBjQWX3UF0TL1EEEwoqnq9s LeWFowsB7GWnetIohTWo8su/P2BOoobjuIqWCYJEWkn2SnOa8P4Ic3Fxu3MiMlzFDtST7a Gc5LCHa/lcoPJzOKzM0Ql2aNcjn/lO9IZWjMubV22zB8L9ILthM5BaAsTbz/0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721949087; a=rsa-sha256; cv=none; b=f3wcyrkErX1I46fdXNVE0I9asvchOwzziiBFNel+Ab+5Ty8cOShrIfaTPI03tIx2QaGP5+ VdII7X/1OcZY9yAcTMLhd1eFsRGSnWe8oRBcUYp9h81ofLX5dtXKuMdb+Dllo0Y7tbmFB6 75QmnEtX5AfPf0SATl+qTBnS7FNDTVUV6otFFxpErEfVBwHYjlQvDueGEHjNPCBSf8Cl+/ xAveta2L/zMBEq3h0DHXikFUbvIXUSA5w0KkTTaFqR6zMMFPuLrhz9lOjpBvLyMaHBLEJz 6Q3jIC+WJRLY5zPBxe+by/cVwijXAksdhXL20yVNltFU9Q4M+bXjIJp6PX3prg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721949087; 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=lD3FwVxx/+oMx4dVtN7awTD+MMr5SQqNvSvLqcbzUu4=; b=FWxDCTf9WKSQsp7+925RPMEhd1/T/qSelmEmGvDHO4RScmyLLfodxwjlEJ6dkdwg9GeB+O EPIi+hMWgji8ISt+HGb09FaH2kFhGqRB3tAZRYxb7GcnzEkZmqYF4wKN+0DMzG3IBqFhXf aWbAQTIEl9zApsG4sW5Wa+4jDZMlHsYWAwpPFTC49Atx3d73CzFHzFvJWLkIGk1D/c9qVg EHtLR5NOgdRIeXXOSzrvpaID4Vbh1MrHTK4aDP80cC6AsM3Gia8aUer4P1hoE9LavkK7yt 5quB4YZI4GzCnJs1AnX6wT/E1DVnJ4GRAwOvWRejSrnFbh5bw42XXDW2k2OkIA== 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 4WVRTW2zRTz1DJV; Thu, 25 Jul 2024 23:11:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46PNBRKw010914; Thu, 25 Jul 2024 23:11:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46PNBRhM010911; Thu, 25 Jul 2024 23:11:27 GMT (envelope-from git) Date: Thu, 25 Jul 2024 23:11:27 GMT Message-Id: <202407252311.46PNBRhM010911@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: f5c894479e59 - main - Revert "Avoid division in round_up." 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5c894479e5986323a0d5a5a698c7d2177eec20f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f5c894479e5986323a0d5a5a698c7d2177eec20f commit f5c894479e5986323a0d5a5a698c7d2177eec20f Author: Brooks Davis AuthorDate: 2024-07-25 23:10:44 +0000 Commit: Brooks Davis CommitDate: 2024-07-25 23:11:11 +0000 Revert "Avoid division in round_up." This reverts commit 2b229739e7ca43b36e53f47147ac05a91333f7b9. Pull Request: https://github.com/freebsd/freebsd-src/pull/1343 --- lib/libthr/thread/thr_stack.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libthr/thread/thr_stack.c b/lib/libthr/thread/thr_stack.c index ab3b73085bb5..f576a2c04104 100644 --- a/lib/libthr/thread/thr_stack.c +++ b/lib/libthr/thread/thr_stack.c @@ -126,7 +126,10 @@ static char *last_stack = NULL; static inline size_t round_up(size_t size) { - return (roundup2(size, _thr_page_size - 1)); + if (size % _thr_page_size != 0) + size = ((size / _thr_page_size) + 1) * + _thr_page_size; + return size; } void