From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44E78C43334 for ; Tue, 21 Jun 2022 08:01:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D045E6B0072; Tue, 21 Jun 2022 04:01:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C8C2B6B0073; Tue, 21 Jun 2022 04:01:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B2C6C6B0074; Tue, 21 Jun 2022 04:01:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 9F9B86B0072 for ; Tue, 21 Jun 2022 04:01:23 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 689BB80F66 for ; Tue, 21 Jun 2022 08:01:23 +0000 (UTC) X-FDA: 79601498046.26.7589BE9 Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) by imf06.hostedemail.com (Postfix) with ESMTP id E79A21800A5 for ; Tue, 21 Jun 2022 08:01:22 +0000 (UTC) Received: by mail-qv1-f54.google.com with SMTP id y14so13921822qvs.10 for ; Tue, 21 Jun 2022 01:01:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=58Y9+S8YUUcxxOlJT1UyYn0YwlJPcr5IqrrowcigrGk=; b=aVUVd/0dAqac7l58GTwqipnXWm185d9jayMBuFd/GL6zwCOFbeia0ZPqs3Mreoyhwm dF11N4YRNecFJsmUfXUOYMQh355M6vgCRqUTWBnM0nKQXy0i3/B1beJfAscA0RcPZixU Y6Mhim16vrZFCxo1bvhwOuG4QyCxrogTZu7cbgzbUC0l3v6xi0LxMtV3R3vhXUHJRBTx c5XS4g4i13ScRVEcN6KhHHVXsBnfPySA64ynH+Ci1MXbO++ryjzHaq0uP5KfJPEwSPtG 3FxkNfWvH60NroWVpullEj8pV2cHdI9SLxSfIr6phpI0qf60Ji7IdgHKLF+CsoR9lOE4 Mymg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=58Y9+S8YUUcxxOlJT1UyYn0YwlJPcr5IqrrowcigrGk=; b=LL/jGX+UraJa3lpGFpc/27KmxiClU5IWaeirPsbYmywa5/gvmB0E1vSMbLuG/bxnwp BClfzVPSSm+rS6Rm/3RKa8OcpeqU9GJFeNYActRLGdNy27L1LI37Dj+fuUJyVB+5CG9q 3JCxMw6jRQMiGdXBO2UqAfUx8wmUlvhjxHI4rpb+PXAfNl9tBpw6NhLTHr9g5wR46m7m lioQEILnP3uzbvUZLD0DZN6IcnJUMkaw0WO6M6IdBH9o1pge1NkZCF/2MHn/K6Bx1PCn EZkoVgY/qjwl6oTqpMfM4WMD2TqC6920eipfxI7Tryqfsv65D2S3NQbMELCps3iqo6tC XhDA== X-Gm-Message-State: AJIora9csorK+bI2qG3odOXSmfiqxEDyePx/2n2b3rVbVp+zZ25GU778 J2AH45wVk5pY1cPN569y6g== X-Google-Smtp-Source: AGRyM1uuA3O9RLbK4blJ0GR1ecl+qHMuJsmHuHQvHlc+j/Tf/WlVycb7HPzLQ5Tj/0c8cHrIHgQAag== X-Received: by 2002:a05:6214:f0d:b0:470:2d21:7a0f with SMTP id gw13-20020a0562140f0d00b004702d217a0fmr13967414qvb.44.1655798481839; Tue, 21 Jun 2022 01:01:21 -0700 (PDT) Received: from localhost (c-73-219-103-14.hsd1.vt.comcast.net. [73.219.103.14]) by smtp.gmail.com with ESMTPSA id e12-20020ac84e4c000000b00307cebe3e07sm9536006qtw.79.2022.06.21.01.01.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 01:01:21 -0700 (PDT) Date: Tue, 21 Jun 2022 04:01:20 -0400 From: Kent Overstreet To: Rasmus Villemoes Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, pmladek@suse.com, rostedt@goodmis.org, enozhatsky@chromium.org, willy@infradead.org Subject: Re: [PATCH v4 00/34] Printbufs - new data structure for building strings Message-ID: <20220621080120.bzms2aswvjld6nnp@moria.home.lan> References: <20220620004233.3805-1-kent.overstreet@gmail.com> <46fcdf08-4646-afa0-c112-76d9335adb6c@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46fcdf08-4646-afa0-c112-76d9335adb6c@rasmusvillemoes.dk> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655798483; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=58Y9+S8YUUcxxOlJT1UyYn0YwlJPcr5IqrrowcigrGk=; b=34axlrtC8Rm6s6m6/QAcRlYX+f/iwOrp5FF9OFLQQ7oNNM4ZpPaI3CM7VkfJ+JirgY5weH VpUB4DPz+2S1e+QaS6wg9DWsioVw/bJ1p4P/VVU7c2X0PFBRIWBYyWSM+CO36n4Wd+qzNF OBhbtJ/JPn9nkwEvZEsr2hGuBNWtld4= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="aVUVd/0d"; spf=pass (imf06.hostedemail.com: domain of kent.overstreet@gmail.com designates 209.85.219.54 as permitted sender) smtp.mailfrom=kent.overstreet@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655798483; a=rsa-sha256; cv=none; b=jQ00/gTUTnFqkYVKUHRC2iIbVOCj5iFWbhna1CX2VnQhERga+GqLzGgHByAbFhnQrhzJmb ia+mP7bkqDR5nEdBZjtpbzXHU/5w/5rYI7maXGdCyOAqhoqUkocXWKghMGiO+hgJEVmS/X lWPDne2mwWF5I3SaQlv2JBssvPScK1M= X-Stat-Signature: tusu8uhczzbjooaf84nxn4ebqiixodqz X-Rspamd-Queue-Id: E79A21800A5 X-Rspamd-Server: rspam11 X-Rspam-User: Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="aVUVd/0d"; spf=pass (imf06.hostedemail.com: domain of kent.overstreet@gmail.com designates 209.85.219.54 as permitted sender) smtp.mailfrom=kent.overstreet@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1655798482-137416 X-Bogosity: Ham, tests=bogofilter, spamicity=0.046605, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jun 21, 2022 at 08:11:49AM +0200, Rasmus Villemoes wrote: > On 20/06/2022 02.41, Kent Overstreet wrote: > > > Rasmus pointed out that -fno-strict-aliasing is going to cause gcc to generate > > nasty code, and indeed it unfortunately does but according to worst case > > scenario microbenchmarks it's not a problem for actual performance. > > Well, that's not how I interpreted those numbers, but, except if they > showed an improvement, how much is acceptable is of course always a > matter of judgment. > > However, what's really annoying and somewhat dishonest is that you're > not including those numbers, nor the methodology, in either the cover > letter or commit itself. There's nothing dishonest about it, and I wasn't claiming an improvement; merely no regressions (some were a 5-10% percent up, some down by around the same amount, overall it was a wash). My priority simply isn't microoptimizing everything. I find that programmers who chase optimizing every loop and are constantly trying to shave instructions everywhere they can end up with code where the large scale structure is a mess, and that's where you miss out on the _real_ performance opportunities. My priority is clean, readable, simple, easy to work on code, because _that_ is the code that becomes fast in the long run. Premature optimization really is the root of all evil, and I am _absolutely_ going to try to drive the discussion away from shaving cycles when there's new APIs to get right and messy refactorings to complete.