From nobody Sun Oct 09 19:46:20 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 4MlsxC45wGz4fP3p; Sun, 9 Oct 2022 19:46:23 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MlsxC3cH2z3MvH; Sun, 9 Oct 2022 19:46:23 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665344783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IP2EBK8q8H7G8r4l9nU3ymtZVc1bkwZA/t9D3CeSAaw=; b=xsGz2d290eLk4N+B4ucar+dz5xV/6mAnWQKdgagkG4wEQZ2dfEZEG4XviFJqJhYbbg8xAW uvFWaJNRhOWv0rCEJuZLjH8BabbHqzz561zCHG3tLsYmLMupKmYFEzzgw3QPCQ8zCrc0AI sqFAJewgbmILT1038EQpRoK19QmsiqQ507qcO3eDB1XG2Dut+6hqCrOLT+J0BeO2Vy2GDg r3L06AvL+dgtQIv6thUtry3+wbHAvtrKqTmw3L4/Wnr+VRHYG8Acx4D/npeH5CEDRIq5lS 0xTebgj5XBrcy4Qi4zoqyMRt5FLOMUxUnEXjTemM3/8yL2H6vn1zoJ9ufFEHmg== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (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 (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4MlsxC1njYzpsp; Sun, 9 Oct 2022 19:46:23 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 1F90F1E688; Sun, 9 Oct 2022 21:46:21 +0200 (CEST) From: Kristof Provost To: Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 133935d26f20 - main - pf: atomically increment state ids Date: Sun, 09 Oct 2022 20:46:20 +0100 X-Mailer: MailMate (1.14r5852) Message-ID: <01432728-6156-4519-A970-BB11DE290DE8@FreeBSD.org> In-Reply-To: References: <202210081641.298GfT2F036984@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: 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: quoted-printable ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665344783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IP2EBK8q8H7G8r4l9nU3ymtZVc1bkwZA/t9D3CeSAaw=; b=URHesy5XQWrn6lioVaj5L4cCEtK1ZHfR5Ny5tOTcCzY6LfU9n2KVcaRKG+GCiDgrDvimzd UiTxQIpRpAn3ghxZVGnoJFJE930mtg0BElbz15enkJz1HZDZcgkv9FUQUWf/4wUKzXgCL1 m3+pZ7EgwkZhgqP6F/uF04IANC4tClNSbGHgvbUfQcP7KJrO//IKJr7I5MuKA+lyigN7EN xrnwRPtXwwKY1YYj4nU71apVipIxluiEt61jFjfNtHDEWuiO/5Oyu7OS0ZGdVzfc96+p+w YfHuyiR4qNch4PDIU+NGaBEKQHDwBmXo7+VgfPdSwD/udItlVLqC+3FFsUjorw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665344783; a=rsa-sha256; cv=none; b=FzUmSQQspy6s6jgnCqIP4wBpVexDO1GJ4YiI+QRmyyjv1SWcpb2aZSpXU6WnPQ9gzs1Ail P5RxB4pyFMyJYhnS/H8qF20/x0hAQyoMBvQXxo5BH8A9jHHtF0XTkOI8y/u26/4nTvuiCt rOvieQHwGl3Yvytt9ARhWje1FvxGzETj27sT/Y6Eb9HhlksaeepaRNi+N/5sDWjBLmoTBT KX9Xymryjzzkf078cl+2enGHnFRkpWK6nNvLzsX/mBjpvchr9LPI5eB+SfVNDZgjYXXvIP YKzy7QlNhyp4e72SxloTDISF1M3qMVkb0uQtooiGzdT8aoXVMg0ft6qk4iFNwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 8 Oct 2022, at 23:26, Gleb Smirnoff wrote: > On Sat, Oct 08, 2022 at 04:41:29PM +0000, Kristof Provost wrote: > K> commit 133935d26f20c0b9c433da9a2b32bcbe562bc2c5 > K> Author: Kristof Provost > K> AuthorDate: 2022-10-07 17:17:06 +0000 > K> Commit: Kristof Provost > K> CommitDate: 2022-10-08 16:27:29 +0000 > K> > K> pf: atomically increment state ids > K> > K> Rather than using a per-cpu state counter, and adding in the CPU= id we > K> can atomically increment the number. > K> This has the advantage of removing the assumption that the CPU I= D fits > K> in 8 bits. > K> > K> Event: Aberdeen Hackathon 2022 > K> Reviewed by: mjg > K> Differential Revision: https://reviews.freebsd.org/D36915 > > This adds an atomic operation on a single word on a state creation :( > Previously two state creations could run in parallel without negatively= > affecting each other. > Slightly related: has anyone ever run a benchmark on state creation? All of the benchmarking I=E2=80=99ve done so far focussed on traffic rate= s, so state lookups rather than state creation. (Which I think is the mor= e important metric, but obviously we don=E2=80=99t want to overly pessimi= se state creation either.) This change does buy us =E2=80=9Cwe actually work on > 256 CPU machines=E2= =80=9D, and I strongly suspect this isn=E2=80=99t actually going to be th= e bottleneck on state creation either. Especially not once mjg improves u= nr64. Best regards, Kristof