From nobody Thu Jul 25 23:13:45 2024 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 4WVRXB6Jc0z5RWL2; Thu, 25 Jul 2024 23:13:46 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WVRXB5Y7lz4YDq; Thu, 25 Jul 2024 23:13:46 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721949226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OsE7lOr6TRRWexJ+DZtIzkEsn71RtO4+A/pP7tofoRo=; b=G4X2KkoBEXtk7YzbrJ1C2Nf21vbdRgvbVkTh3X4M+CIr0QNdwh0chwSoFqw+k9xdmn8WfN +Irgcbk6rYIWDKiyx3rBNfyS8OJuHiDuo3tMu/W0GEg89J/YDuk0jPjO5mabxFtUNjQjeX Emexekv7Iv/QQDcJIyUrqykdB/bgwn8GfPzOfFK3muINXiwCLoEIEPGOg7KFOuwsB7bR0Z 1WC+WCfD9iJckHzoYGSbX3uDwdPtQcUG+l5CsyS0M1G9aOP7q9frhgNWtfqv5nPiTLpIUa npJEcrEl5PuO7YqhZp4qVIY0FJAVEYgOHD6XkDjdJrB34I0tk0xHh5XuqvmlQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721949226; a=rsa-sha256; cv=none; b=d9K1eneKk48bv0lhdF6CaTAORtRkmZLeT7ViAjJcklyuEOK9sepT5cSapgi1spYRick6Je CjbVeJjnPucelG6WDkim7iNgXqYwKgoomv4JwVdEdZ0hnOSv+97Kg90ylkohS4DS9KHd7q 75+xaXtAiKKRaHRfUPrGvUdMsgSS9iVi9HBAEnRK3ivvVHZYC0+6rVAoxrehKJerjCv0c+ 4SJQCjoAAlGTyzn2LM7GEYowgQHv0KuU/mh/Y5GXXNLJ76fUaCy1noGmwXqcsHMrRfCMgd 1/4twnf39SXo7M2IYHzP7g5sE0SBNVJG0pVHQNsNysnwNZvZKfTrTTYG5Orj7w== 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=1721949226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OsE7lOr6TRRWexJ+DZtIzkEsn71RtO4+A/pP7tofoRo=; b=tpf0Xz8t7/96iAhigC86I6iGbZjEvu6yZCyCf2iaoojOc7DQdEInVwh4rIGaEOuH1qT+Or c+6n6bTu7TDieLGm/bzehoC7ve8C1Nkk6jxz1XrD4xoRTUDPFfUwg20Sn24ylrJeT1WTdd XwGC1XJSIT76ba7YNhMczdg7WdwurdLycVWCGU+MhQEim5AMvD90+N2G+pe9UAM95GV78E mEyneillSOL4t03wignEvgt2vz/FBcv9Qb1M9gjmkAXVcjtPRgxQo+fqD2L1MasWWcJzUy 89+weq0gHtU5pj9Hu3USL6itBzWdtan3rIaLlhD6ZIArr4AHI/ovmCwIUWJX8Q== Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: brooks/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WVRXB4whjzL8s; Thu, 25 Jul 2024 23:13:46 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id DEE1D3C019B; Thu, 25 Jul 2024 23:13:45 +0000 (UTC) Date: Thu, 25 Jul 2024 23:13:45 +0000 From: Brooks Davis To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f5c894479e59 - main - Revert "Avoid division in round_up." Message-ID: References: <202407252311.46PNBRhM010911@gitrepo.freebsd.org> 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202407252311.46PNBRhM010911@gitrepo.freebsd.org> On Thu, Jul 25, 2024 at 11:11:27PM +0000, Brooks Davis wrote: > 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)); Doug Moore pointed out that this isn't a power of two as required by roundup2. Sorry for not reviewing the revision to use roundup2 correctly. -- Brooks > + if (size % _thr_page_size != 0) > + size = ((size / _thr_page_size) + 1) * > + _thr_page_size; > + return size; > } > > void >