From owner-dev-commits-src-all@freebsd.org Mon Feb 8 23:16:56 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 781925457D2 for ; Mon, 8 Feb 2021 23:16:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DZMNm2mbBz3JSK for ; Mon, 8 Feb 2021 23:16:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72f.google.com with SMTP id a19so16355215qka.2 for ; Mon, 08 Feb 2021 15:16:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dzLwaN08NA3n/DYkB2TpPc5qEpVbaeOa6v+Qi8Eh67I=; b=WWdOza8rYiRB0I41eeNzIWSPTNgP7c0dWBwg4a4/40yXST1a4T5F9NrOESmgSPg2LL ltSXnG+nbC0bZPybnZkjdJjTsjDtRNuXWaK5fwQixdIHYa2D2UxzKyXC1j7vHthrL1Gi TYosF0F/KNLyvfsRWN4CUjAnlgq4UCpZyNKl80np6v3V/r2V9Jsq4ty8jrpKYP9YGRnp AbxDf6tCoLkb1BlWdvUPTt/RJbofmFciZiAtfegrU4P7ZTgynSgBCXB8pktvlVtZwK1r y+ZolIEXY5mg1O0lg7jIHQvyrEx3TPX01T6vlsBj6x71aZVKevJKx3glbEtsHiTP+nCB YdcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dzLwaN08NA3n/DYkB2TpPc5qEpVbaeOa6v+Qi8Eh67I=; b=a6VQUZzgtCqOmiUeOqb1L4PfP4bBmxvgrfm3wOACBpAuYxiN0trFW+Pnq8xNVkjh9W Fiz8/RJFq7+/mM1nIIxPoRmAnf0yxp6fQw8gNp/ACKXu52MPN8l/7cslnw2YZmMwEXN7 BS1v0YdhoO/gnNYHXvoAWZ5CIz3erGhA2HvgiMGbGluWfBjglY+dJmr+NXvkMn4ZE1hw phMd5Ly5LFSYIwRZWmkU9R5OGTsKHr4Gp+FDvqDTs43rlkg1cMbMpMsyXAhI+QZ4W9pQ PdpiItcGlkVLlpGZak4tUEiT6uf00iP8oXMza8VnwTkZEU0tbVeXU8rMWPmCwSIg9OhA S28A== X-Gm-Message-State: AOAM530rlwh57FAdb/A7OOSO0ttyxoyYHnT8nP79qB/BDBceyBNyuiyp lH0pzl85Ko3pgcM1xf/yOztLMOOGvoPBqnEL+zQ5rg== X-Google-Smtp-Source: ABdhPJzexS1te6dPZevr1coOX9p3LjyF0UQlJura2xXR9JK9tG39DJoi0p0zA0f5Kkg9XKNKUNpnPJ+nPAMWfXuPOXc= X-Received: by 2002:a37:ad1:: with SMTP id 200mr20092077qkk.195.1612826215557; Mon, 08 Feb 2021 15:16:55 -0800 (PST) MIME-Version: 1.0 References: <202102081915.118JFXkJ067892@gitrepo.freebsd.org> <3E64387A-42DD-4470-8893-5B774F19754E@freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 8 Feb 2021 16:16:44 -0700 Message-ID: Subject: Re: git: af366d353b84 - main - amd64: implement strlen in assembly To: Kevin Bowling Cc: Jessica Clarke , Mateusz Guzik , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" X-Rspamd-Queue-Id: 4DZMNm2mbBz3JSK X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Feb 2021 23:16:56 -0000 To be fair, though, FreeBSD has been moving to a culture where people seek out reviews because they produce better results. It would be better for complex changes, like this, if they underwent some kind of review... While the tone of the message Jessica sent might not be to your liking, the notion that people should seek out more review isn't wrong... Warner On Mon, Feb 8, 2021 at 4:13 PM Kevin Bowling wrote: > FreeBSD does not require pre-commit approval unless called out > specifically. Are you volunteering to review the changes, and if so > where is your guidance? These messages are otherwise unhelpful. > > On Mon, Feb 8, 2021 at 12:37 PM Jessica Clarke wrote: > > > > On 8 Feb 2021, at 19:15, Mateusz Guzik wrote: > > > > > > The branch main has been updated by mjg: > > > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=af366d353b84bdc4e730f0fc563853abc338271c > > > > > > commit af366d353b84bdc4e730f0fc563853abc338271c > > > Author: Mateusz Guzik > > > AuthorDate: 2021-02-08 17:01:48 +0000 > > > Commit: Mateusz Guzik > > > CommitDate: 2021-02-08 19:15:21 +0000 > > > > > > amd64: implement strlen in assembly > > > > > > The C variant in libkern performs excessive branching to find the > > > non-zero byte instead of using the bsfq instruction. The same code > > > patched to use it is still slower than the routine implemented here > > > as the compiler keeps neglecting to perform certain optimizations > > > (like using leaq). > > > > > > On top of that the routine can is a starting point for copyinstr > > > which operates on words instead of bytes. > > > > > > Tested with glibc test suite. > > > > > > Sample results (calls/s): > > > > > > Haswell: > > > $(perl -e "print 'A' x 3"): > > > stock: 211198039 > > > patched:338626619 > > > asm: 465609618 > > > > > > $(perl -e "print 'A' x 100"): > > > stock: 83151997 > > > patched: 98285919 > > > asm: 120719888 > > > > > > AMD EPYC 7R32: > > > $(perl -e "print 'A' x 3"): > > > stock: 282523617 > > > asm: 491498172 > > > > > > $(perl -e "print 'A' x 100"): > > > stock: 114857172 > > > asm: 112082057 > > > > No Reviewed by? More than one pair of eyes on non-trivial assembly is > > almost always a good idea. > > > > Jess > > > > _______________________________________________ > > dev-commits-src-main@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > > To unsubscribe, send any mail to " > dev-commits-src-main-unsubscribe@freebsd.org" >