From nobody Mon Jun 05 08:36:03 2023 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 4QZRlS1MFCz4bLyg; Mon, 5 Jun 2023 08:36:04 +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 4QZRlS0TdHz3x1X; Mon, 5 Jun 2023 08:36:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685954164; 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=7o6GkU4q2nHWn+CdSSgrzxpB1VRcIt8cXDNgZxaq9e4=; b=rTafMRymr2z4P1g1ShXg1aT/qFRkO7eFyBhKLsHdMHigNq/unrj7q5ZXcTWLtndPCpxOPj 8be0MOwJxY8Jgp7ILmVGIfyJMJ3oqRk+JM3D15/UMmdMEFQp4pDVVNnA+VQJ8L6nOKsEJA TjZhYMZZUnnqmONFG6KDbbTdmdIFvvSE2t8GW5396pa3SnRaw1S09navBhBsamQHqaJKdS u0Syw0ia6VZL5tNozTub3Fa8SplorJzHEhpMu963AgBF9AgHoby3qsJ6E2JGXhlzgpla/+ zDrsy3OtGkaXd1QmaXrH2UFAggAOQAfCFSP6bu71C5UgBKL8BjlKbyLwY94F0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685954164; 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=7o6GkU4q2nHWn+CdSSgrzxpB1VRcIt8cXDNgZxaq9e4=; b=KaRqiA3wtQZC59nuZwQ2lFDHAjuMEFiATLcKSr7oQLPgYb4n9+6SCW6Gnx6MM1I0LWvCTp YsPqhn7ipsb6l6oxpsewlbfa5OyQGbFxkcKNQuKcKVQagZ7EsW9+Sck2YJuRG+lCHQlRaa ZMWnwzZU3BMbn5p3iVrPkMaxvKZ4qud47VuQWoWdEEdxT9ZcNELAY4M5v4JNjxJbxEUY7z hh7+Vcui1PObEKhs+SIAqGGURO1YyEywSyiGn2bY5GCNJ4gCJWX7jvxVDh+FVDEjW5/Ne0 5iOOLMM+Z1QbvkDU/Md86aVGVJ5+NBJ/HHB0/sycwAF4utremegKjkDhpzI2rA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685954164; a=rsa-sha256; cv=none; b=nLEpKbyqXT4aQUavzp+OyIr57bTsHsf/ImrS+ZSvU8FaUYjd1sr4mbhUs0JzYiGejB6Trq 5efxBltEqYiqSkpU3ea0wtCIoQb35HGFcMosCQjBhAmkGE+FB2QaJHjXP8D1lBC2twsnhl cGmj8Y1Ml+bMkFbDJqq6+HHWipgvM/ysyq1edOz/LjHI4H3mzXKwmMpE6fX0fXIAYHvUhB fat/utFo9tSEmgezEUoUI+SojrnCPEyMocvdHXXl8s1VqskPNJOkePqv92/pfAoORMO5fD 0Yg3sPXEIONwcksQJ2qBLEeUwdVv8jLn5hNvxbRrf373B+4DPBhTw8dw7WOMhQ== 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 4QZRlR6Y1Czh0w; Mon, 5 Jun 2023 08:36:03 +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 3558a3sb024392; Mon, 5 Jun 2023 08:36:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3558a3Uk024391; Mon, 5 Jun 2023 08:36:03 GMT (envelope-from git) Date: Mon, 5 Jun 2023 08:36:03 GMT Message-Id: <202306050836.3558a3Uk024391@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: c26549327f42 - stable/13 - subr_unit.c: explain first/last special ranges 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/stable/13 X-Git-Reftype: branch X-Git-Commit: c26549327f425bc1b0272037d524af18392c0c88 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c26549327f425bc1b0272037d524af18392c0c88 commit c26549327f425bc1b0272037d524af18392c0c88 Author: Konstantin Belousov AuthorDate: 2023-05-14 23:11:17 +0000 Commit: Konstantin Belousov CommitDate: 2023-06-05 08:35:01 +0000 subr_unit.c: explain first/last special ranges (cherry picked from commit d44f477038d3ede5fe62fa19c9301b43455cd8f1) --- sys/kern/subr_unit.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/kern/subr_unit.c b/sys/kern/subr_unit.c index 6c1368c64e00..a78b6ddf4840 100644 --- a/sys/kern/subr_unit.c +++ b/sys/kern/subr_unit.c @@ -191,6 +191,12 @@ mtx_assert(struct mtx *mp, int flag) * For bitmaps the len field represents the number of allocated items. * * The bitmap is the same size as struct unr to optimize memory management. + * + * Two special ranges are not covered by unrs: + * - at the start of the allocator space, all elements in [low, low + first) + * are allocated; + * - at the end of the allocator space, all elements in [high - last, high] + * are free. */ struct unr { TAILQ_ENTRY(unr) list;