Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp112639ybm; Tue, 26 May 2020 12:05:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwU7XDEEn5GGVe75LYrRtQgSzNrNnK6ztKk6FRbQ3JVxxWwkkIzKxeQKPOGVvJxZJfqkCHJ X-Received: by 2002:a17:906:7a4f:: with SMTP id i15mr2470895ejo.71.1590519954699; Tue, 26 May 2020 12:05:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590519954; cv=none; d=google.com; s=arc-20160816; b=uPQxf97XzCKKOhzf1cZhnk5gf/xTCIK6/0BrbJ1GWFCtUcqrR0s8Fvwem0HLSso/hE Ru5niniNz4nLgZ3kt0JgnHS3J+eLlzIeXFFwREu6S0iDpBL2ZOUYYXiv3mlB3sauQH3Y IxW+WGGtmPWJVt0aod2FLAC2batqIcc68YCyEkjG77ZCrDlVJnHOdT8Oug4AqAuDG5x0 eA0HbAf3mZUW+lYdrjzo+yosHhdIT+hyNYrda5NhBAp3rVlhEzMk78jvykc5c+IiWJtc toOEslvRNSszjJWD/dgi7RxIoJ6IrfDE390JgJIQ+BSYVaDNRjXCBW8tfV8nXd/R8Vt7 31cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=6a2oZxkItd9AGUyN44aak6tkm3BpLOq0hsKo8qlhGAc=; b=wLWj6//kGvqSYb3IGpg9/THww3+ISuADkTwRz2/fKxPlD+uU0T/QwSHfXjC1BLz2D9 oaNgGSum9ZMOK9TurRnr4icFalU8/Cu3uft6L6F9vaZfIyupwwIgTDdyEQmD1c6AMdFK 8t6oNLlb3SZae452kju+6L8UI2XyAtZ3EnZeqXbzRbv/Iud825RCiA7wAI5mje6uONg7 Bk50/zCwVCwfIUNUldD7mQeKRoOHCtSfBy4XnU4MRwl6rpZ8yJeVg5QHpw5QmQ2kIHhQ kZK4y1lAYeXzQMz/v2sQLVkHtLM9YyTsRpRieoiaxozXSFA4kdhJzpDj64joez7l9VoB CFTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z2si430908edk.387.2020.05.26.12.05.29; Tue, 26 May 2020 12:05:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390794AbgEZTAl (ORCPT + 99 others); Tue, 26 May 2020 15:00:41 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:41755 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390758AbgEZTAj (ORCPT ); Tue, 26 May 2020 15:00:39 -0400 Received: from mail-qt1-f172.google.com ([209.85.160.172]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPSA (Nemesis) id 1MHWzP-1jqYz61nhB-00DWzw for ; Tue, 26 May 2020 21:00:37 +0200 Received: by mail-qt1-f172.google.com with SMTP id z1so4970154qtn.2 for ; Tue, 26 May 2020 12:00:37 -0700 (PDT) X-Gm-Message-State: AOAM533FP+3xy5hEgTc6kzXBQ37uL+tJvBpF1gubijXOwzz56oKi1jfr OAcaKIo+hejGlvUo2is1mtFEMYXWkB+kiLC0Otk= X-Received: by 2002:ac8:1844:: with SMTP id n4mr300518qtk.142.1590519636182; Tue, 26 May 2020 12:00:36 -0700 (PDT) MIME-Version: 1.0 References: <20200521142047.169334-1-elver@google.com> <20200521142047.169334-10-elver@google.com> <20200526120245.GB27166@willie-the-truck> <20200526173312.GA30240@google.com> In-Reply-To: <20200526173312.GA30240@google.com> From: Arnd Bergmann Date: Tue, 26 May 2020 21:00:20 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH -tip v3 09/11] data_race: Avoid nested statement expression To: Marco Elver Cc: Will Deacon , Nick Desaulniers , "Paul E. McKenney" , Dmitry Vyukov , Alexander Potapenko , Andrey Konovalov , kasan-dev , LKML , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , clang-built-linux , Borislav Petkov Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:YZvZtYzPL/ad9yexnmdrNznL+6Kj7ZbcdRnrfB6SJ6T3EEGT3S2 1eZZL4jOMAVQMUSFSBEq6hpa87+1QwMQ0GGLzBKA/gpyJX3TDL0E0TN0QVzba/RTcJ2/fvG 40MgQOmvi5nEEWeQ4yBoYAHqLzEfwOLrWkaHqh8WwPTsOaQbBVn81rOKdEsgrtbClT4NFaW chuPy9zVoZmuxh+bwXgdQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:kgXZ+s1WhxA=:j4tArGneAtjwl0yJKAWwBc yi3MVuFvE7LnXEgNrHZW3f+eHQaS/ssYpHTnuE3egIWG4ZTScgWkYnigUpl62Kex4A/8hTquW JrOHIshNbWkEiF5Xrgy9SGk1CZ5Dd9J8dAQk3tqt+c0Jjw9E8Cw7OnyJWNKV5LeK0XJFrcgtb Nx3KYK3q7W71sTh6XbKSDxUng2giWHY0nJq5ErFb0/L89Dv1pNWnZMAcNFoicYPPpJ+XjxGDq tRKyHqDnQRBw0LIVP//J7SHqq7S8h2Fm12tBkQVSQXCIxgF6XTtF5VdcUa5ns2R7JBcxhE1LG qKolhuXVGyxoGpCEI9+rF4K2GYXhfe4jRoLarZ8V7aTM1kDSfi+kcWsm3P3XVHGLTLZ97bKv/ bSKHxL76gfRx/VSLfRRzOM5MSBihiOEmf8A/q2XEy6vLNhw/ed0Lun98pFJKqFKALwihrdNyd GD/hibBnWWySRJ6C/Rlzn9XbXh3f/D1F78HK5ygtwlmCjnXJDRPJXYECwQ2dALUue9o26sYqL GXMrIe+y8ZtSilfYHg4blo7wpQ7HNpWKmwQZ31snQA41u6f+P7GKcTdaDiZZyXbPgf4HfWMfv ojePz5MIKUrWTxuJMydE4LGAwRqHks/vryh6il680wuvvbu6EIxmeG2whycUOSs8PGG49SX4c hEIGV3rtdLSo1xxu4S4+qHW4AFXjCfL+bcNMFfY0elQH2CjnZTPyVPeGuK2tRwB2EqK0RR1KJ ZBRxjKxhF13CH1RqgW8L3x8gilZSbuIx15X4A7TJlj2cDa4NG4ocXx0ikGf8kJOc686uyxdKZ 4g5elRdpIp4oEIgspvrJ5D68769mW3UlU5j6zo6N9USY3yV7HA= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 26, 2020 at 7:33 PM 'Marco Elver' via Clang Built Linux wrote: > On Tue, 26 May 2020, Marco Elver wrote: > > On Tue, 26 May 2020 at 14:19, Arnd Bergmann wrote: > > Note that an 'allyesconfig' selects KASAN and not KCSAN by default. > > But I think that's not relevant, since KCSAN-specific code was removed > > from ONCEs. In general though, it is entirely expected that we have a > > bit longer compile times when we have the instrumentation passes > > enabled. > > > > But as you pointed out, that's irrelevant, and the significant > > overhead is from parsing and pre-processing. FWIW, we can probably > > optimize Clang itself a bit: > > https://github.com/ClangBuiltLinux/linux/issues/1032#issuecomment-633712667 > > Found that optimizing __unqual_scalar_typeof makes a noticeable > difference. We could use C11's _Generic if the compiler supports it (and > all supported versions of Clang certainly do). > > Could you verify if the below patch improves compile-times for you? E.g. > on fs/ocfs2/journal.c I was able to get ~40% compile-time speedup. Yes, that brings both the preprocessed size and the time to preprocess it with clang-11 back to where it is in mainline, and close to the speed with gcc-10 for this particular file. I also cross-checked with gcc-4.9 and gcc-10 and found that they do see the same increase in the preprocessor output, but it makes little difference for preprocessing performance on gcc. Arnd