Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp339687rwb; Fri, 2 Sep 2022 15:18:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR66O3VWcuNxuARhjA8nRYXt7EXKm+eyevzl31JivfRmEEAqePupuzmJYMrBppJKgeqHW+3A X-Received: by 2002:a17:902:aa8c:b0:173:4137:55c4 with SMTP id d12-20020a170902aa8c00b00173413755c4mr38223049plr.108.1662157086213; Fri, 02 Sep 2022 15:18:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662157086; cv=none; d=google.com; s=arc-20160816; b=f/ZcczPKrwkV5B+MfKzU0Rksdx6N2biIr/lE83ljBN59jxTyhbo3i+J8lBCfgFY+Su VHqLIeFgAoBT1mcOfdRaLYNvEkCPQDHHCV8Td9at4Rmn9TngB0gogmxAkRVuhnZa5WNj /oW+RVVgEIGL1hEIKVF1DtmlHdUwPzXpss9VZVnv3KxUZEI316s0nYW2zKY+3tftJOED U1SNkSMHz1gskwzrsLbKEi/zx3qcPPhrLC9ChIujqhAF0ZDYGBnqhM4wAsTFD+ZGL/Rs wylhgBQideyJPsvrjPeypJCiRuPXpTSaCEtXdrLBQuBddeDXgKTpbwWOnJ+6ZkX33j2M KZag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=gN0Irs2o7oP1brfekJlSB6uGcftAcPdWHSp57rRt4Lw=; b=DqvlfSf5BtCyWEasnWVimPgR1Wy+gsYWP0hm4yC/inwC4zhH00setzOBn7bYe8I/wm 4xOY0fUPdBUnjjl9n/o2++L7f2N/VP7BUtQBhsu7o63rXqcyY7VP/kOlUOIFy3vaT0UJ pQZ9bZ5KbuZSF8qUqsHMQnK6iZBJJwu7rSpBY1WQB3IymcqQNgHr0izij5JLj4Na57a/ /5CEk3Y5d7N2MlsbhGGK+fO63g4Z5BO+DV9ilXqh30tEq/e84wSygHINoTHTihATcNWY G3jJ1yweAGRK6EqHTj/zECfUx+ZJ+9iNFSfLUzruizBevAVOn26mWTQRWGBxV3yj7yHD 4U+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Zf1Rwmoz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020a655888000000b00429fd909955si3046967pgu.90.2022.09.02.15.17.52; Fri, 02 Sep 2022 15:18:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Zf1Rwmoz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229500AbiIBVvo (ORCPT + 99 others); Fri, 2 Sep 2022 17:51:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229968AbiIBVvk (ORCPT ); Fri, 2 Sep 2022 17:51:40 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B2E8F32FC for ; Fri, 2 Sep 2022 14:51:37 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id k18so3485004lji.13 for ; Fri, 02 Sep 2022 14:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=gN0Irs2o7oP1brfekJlSB6uGcftAcPdWHSp57rRt4Lw=; b=Zf1RwmozYFv+ANs5Gsy4/WsBmDjw/JT43hlHNS0w9g86VKya0DDyD27O1voWWrKxQ9 ETFZ1f6B5nezMOJQ0k+J3NnLDgKmHJ+tquVFusKYsR9SXhIyiUxwn7ryF65i8Eh2PPiI 30bcQLSr3pxT8LQntuioWTHobmla49/diTT1c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=gN0Irs2o7oP1brfekJlSB6uGcftAcPdWHSp57rRt4Lw=; b=0mfZjtQqmvnI2Pbx7Vjx8wEdoKIByyJ7SUGCDZk/ULLxm3wt2z3Jc8c8lezKr6NEUm aTXg7VH92YJ4TpZ5+Dssq/+ueuxcqBobeUnRXa6LfRwzn92M6Jy3vn0a5VP2eClRiGBA jXCoDg7QKJLi509hpzdgZH9GGhDWHfVyWxU3+7bZl4s1j09GfA12LLaVcewX+dh9vGCX 0hoOscr2vVbadkY6T9mXnNqhp2R/wHM5AcCm3sZF9SC+db2PFZKZkunQU8VBGjuuy3Vf ZakyDJfq+TbEPQsnYqYZemHF34kniKx8HEJK8JnqAeOm0/BizsKKL6hI3D0xWTh3I1bx S3XA== X-Gm-Message-State: ACgBeo2bi0bNmU42m4f+ca4igYyacnC8zO9rIcb+6EOZeXuYHStxdfLF oo/tNF+BBnBEbC5ZaDB6V9nVJVAEc/6m+fBjR8s= X-Received: by 2002:a2e:8188:0:b0:25e:4ae6:5503 with SMTP id e8-20020a2e8188000000b0025e4ae65503mr10935526ljg.412.1662155495389; Fri, 02 Sep 2022 14:51:35 -0700 (PDT) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id u26-20020ac2519a000000b0048b17b0db44sm366487lfi.61.2022.09.02.14.51.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Sep 2022 14:51:35 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id q7so5098616lfu.5 for ; Fri, 02 Sep 2022 14:51:34 -0700 (PDT) X-Received: by 2002:a5d:6045:0:b0:226:d21d:947b with SMTP id j5-20020a5d6045000000b00226d21d947bmr17791740wrt.274.1662155184166; Fri, 02 Sep 2022 14:46:24 -0700 (PDT) MIME-Version: 1.0 References: <20220902130625.217071627@infradead.org> <20220902130950.205726504@infradead.org> In-Reply-To: From: Linus Torvalds Date: Fri, 2 Sep 2022 14:46:08 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 37/59] x86/putuser: Provide room for padding To: Peter Zijlstra Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org, Tim Chen , Josh Poimboeuf , Andrew Cooper , Pawan Gupta , Johannes Wikner , Alyssa Milburn , Jann Horn , "H.J. Lu" , Joao Moreira , Joseph Nuzman , Steven Rostedt , Juergen Gross , Masami Hiramatsu , Alexei Starovoitov , Daniel Borkmann , K Prateek Nayak , Eric Dumazet Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 2, 2022 at 1:25 PM Peter Zijlstra wrote: > > The below (mashup of a handful of patches) is the best I could come up > with in a hurry. Hmm. It doesn't look too horrible, but yeah, fi it still ends up getting the same padding overhead I'm not sure it ends up really mattering. I was hoping that some of the overhead would just go away - looking at my kernel build, we do have a fair number of functions that are 1-31 bytes (according to a random and probably broken little shell script: objdump -t vmlinux | grep 'F .text' | sort | cut -f2- | grep '^00000000000000[01]' but from a quick look, a fair number of them aren't actually even leaf functions (ie they are small because they just call another function with a set of simple arguments, often as a tail-call)., So maybe it's just not worth it. > If this patch makes you feel warm and fuzzy, I can clean it up, > otherwise I would suggest getting the stuff we have merged before adding > even more things on top. Yeah, it doesn't look that convincing. I have no real numbers - a lot of small functions, but I'm not convinced that it is worth worrying about them, particularly if it doesn't really help the actual text size. Linus