Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2173974rdb; Tue, 3 Oct 2023 12:32:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFH5943/dTGoxGKSKxluv8LYT+FFi7qbuSQmKKS3kIUlAVYnTGl/lIPqJ3/j4xz+JzBr5gR X-Received: by 2002:a05:6870:b507:b0:1d6:3d6a:fb37 with SMTP id v7-20020a056870b50700b001d63d6afb37mr548512oap.46.1696361529533; Tue, 03 Oct 2023 12:32:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696361529; cv=none; d=google.com; s=arc-20160816; b=QYgsD9gmD4dNAQGxx9B3ZZVVGQx+eYtJfpVe2fKBOvystcZTvCc1ZzUoC5AMs38H7Z zhJKhmZQO0Bl6HmJEdrIeMRduvFMrJlf3U/8m+jSGRzoJEBMj9Az9a32K53S1f9MnlTD 2vMR2qLNFiDkFWnd+KB/h5lIAWuLwUb0G0krjZjRoHmRdEy2fGYZilFnQ2rsTWPc/pSy 5RtmY9JEaXPedR8KCl4SAyNLv2ArD+YYPInuqBmRORxeyAVxKjEDGtLSs49Y8JaOvbPv d+YwtLoIsuD4GnQnyf3NNOA9eM5itNpZkELXxm0zYCYvVW9m1ZqoJGzRwpApabmLtlfM Fgmg== 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=CofdfLNwmnPtv9xSx67SjuRq4iCQGnyvAYfV1tDDXXU=; fh=VpSn8lwWL2dmYDi7GTRT66M6vNVQVRHPqlMESojROmE=; b=oeZ0egzdP+kFvD7ojLENLFM+jGUmF5fZhDsA0FeasxCwQ7hkXCRT/cAgdVB1jGTBgV JSOxcOjxVgld36SjcmzzZeHnx6RklhVjuWUc+Tx9CFN5Y90MrRVzwDphcmaZ/nwOkCg2 jOlwQJW4IJdzYR2dRmrx+B8tnO8ZI1yKwitPPefcVeYdib+vr/S1AAj9VeH9BB+ZH/83 GeQR+wpQxVb1cxEKKEAcahk2MBxEYzDUecNP9sUzu5gl56LfusXMzSzwDat1rT45W3w7 CQ1sQLBURTtksB6uGoPhetyi/4Hr96t3s34OzQTXnQoLzW5JYx/vLvUOYXB6brB7mx3r pFlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=M7xTGbSY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id a22-20020a637f16000000b00565e92e8734si2058586pgd.769.2023.10.03.12.32.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 12:32:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=M7xTGbSY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 1D2778157DCE; Tue, 3 Oct 2023 12:32:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232305AbjJCTb7 (ORCPT + 99 others); Tue, 3 Oct 2023 15:31:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230239AbjJCTb7 (ORCPT ); Tue, 3 Oct 2023 15:31:59 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01F4393 for ; Tue, 3 Oct 2023 12:31:54 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5333fb34be3so2319469a12.1 for ; Tue, 03 Oct 2023 12:31:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1696361512; x=1696966312; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=CofdfLNwmnPtv9xSx67SjuRq4iCQGnyvAYfV1tDDXXU=; b=M7xTGbSYw1QBvbFFvqTEA/7d1KcORw8jgoYr47acOUdMCHwCOBp9NfR69QOAX4Z+Fk 9EoVowm9++sUdLNVbC7VldtFa+MfWzJ8PIWAG/ygs8cMcpg59aiCUXq3lckkniUUQyoX jvxE5W1PCHyOqBNISPKJXgAgJZZwqoGAkrxzY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696361512; x=1696966312; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CofdfLNwmnPtv9xSx67SjuRq4iCQGnyvAYfV1tDDXXU=; b=LER5eqcc0NFukr53h6KH8xNiE1xOAclG7E/O/c/LB4MAyFIYDOp8wpWDdjfrpjFaU8 1OfTk1Ue9J3Lf5zVAYRqoBy1xBJCWumsvdiv9U7TzxtGUQ6jcV4/d9Y6Dod+P3hZSJy/ FjMYicl2hxXRIVmJXAqmGVE4h2DAWKJ8XDJG8YYxE0DkeHZUI6INhg4eTWZaJKIgKPZ2 L/RLJu/yVjf6YBelychEIOkR2bbLQ30h6hAnRkD5lhyuVB5ijYqfQB2rils3he4P/mcn ePKt++2c2f0hj/LWdFLI61zyAOgstNIpDgOAYEaC57SAkTfHlqhDPJg3oKR10zAPw98n dtpg== X-Gm-Message-State: AOJu0Yyf+RpU2zKRpgRmvtJcgOOir3OCbAVtn9GAjLUvYzuFJo9B22sI kyg5QOqgKlEf6DbhnNU7y4HQ/Bg+0FqA7nt0UCaeVXqP X-Received: by 2002:aa7:d450:0:b0:531:10df:97da with SMTP id q16-20020aa7d450000000b0053110df97damr88913edr.42.1696361512327; Tue, 03 Oct 2023 12:31:52 -0700 (PDT) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com. [209.85.208.49]) by smtp.gmail.com with ESMTPSA id d2-20020a056402516200b0053537ad3936sm1273152ede.21.2023.10.03.12.31.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Oct 2023 12:31:51 -0700 (PDT) Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-53639fb0ba4so2342879a12.0 for ; Tue, 03 Oct 2023 12:31:51 -0700 (PDT) X-Received: by 2002:aa7:d64b:0:b0:530:a19b:175 with SMTP id v11-20020aa7d64b000000b00530a19b0175mr124393edr.2.1696361510821; Tue, 03 Oct 2023 12:31:50 -0700 (PDT) MIME-Version: 1.0 References: <20231001131620.112484-1-ubizjak@gmail.com> In-Reply-To: From: Linus Torvalds Date: Tue, 3 Oct 2023 12:31:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 0/4] x86/percpu: Use segment qualifiers To: Ingo Molnar Cc: Uros Bizjak , x86@kernel.org, linux-kernel@vger.kernel.org, Andy Lutomirski , Nadav Amit , Brian Gerst , Denys Vlasenko , "H . Peter Anvin" , Peter Zijlstra , Thomas Gleixner , Borislav Petkov , Josh Poimboeuf Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 03 Oct 2023 12:32:07 -0700 (PDT) On Tue, 3 Oct 2023 at 06:38, Ingo Molnar wrote: > > So I don't think it's a good idea to restrict it to the devel GCC version > only, the cross-section of devel-GCC and devel-kernel reduces testing > coverage to near-zero in practice ... In fact, while the clang failure was arguably worse from a code generation standpoint (as in "it didn't generate any code AT ALL"), it was actually better from a kernel standpoint: I'd *much* rather have a compile-time failure than bad code generation when it's a particular issue that we can avoid by just not doing it. IOW, *if* this is the only actual issue with named address spaces, then I'd much rather have a compiler that says "don't do that" over a compiler that silently generates absolutely horrendous code. That is not unlike my "I'd rather get a link time error from trying to do a 64-by-64 divide on x86-32, than have the compiler actually generate that horrendously expensive operation". There's a reason we have "do_div64()" to do 64-by-32 divides, because that's usually what you actually want. We should not be doing big structure copies from or to the percpu area, so clang then failing with an admittedly horrendous error message is not a bad thing. And again - my worry really isn't this "copy a percpu structure" issue. It's literally just that I feel this doesn't have a lot of coverage. Linus