Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp165974ybs; Tue, 26 May 2020 06:22:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpfhi5uwq2y+VHwP504zyniRDrDn1GfdJTXWqaGBQWiM4WQKAWAffr8wpSa6qVyzhbP6xv X-Received: by 2002:aa7:d44a:: with SMTP id q10mr20425562edr.386.1590499323285; Tue, 26 May 2020 06:22:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590499323; cv=none; d=google.com; s=arc-20160816; b=LBeq5jZ/1sJ0NsyOUFfPuuaYtvxZgsWRpL1AZqTb+xbzO+lyVEsTPAZ3Jbt8aqtPAI e2kdYMPfNCnr5t0MNWyFsRh5dl9XoRD6te8Xd7yRD4QIvHtqNVey6RRBCpj3pITqZHKL J8/HK8xUCXPHk2aBGCe2fd3iNv8PsOAhk0G2YM4GNis4MrMbaCbe7ho6GmNampFJGZ/y 0kjCUJqbob2IJUiADdIg5akw9kiaKGTDYx8yzvKS8yJYBcUnhHyEfv/qF2SQusPFkK1a 61gmhn8J9Rhv0qxY0eVeIrBtWUF2gunk0NffpQVAwMKiimucFY40VJkyY/nnDs2t849h qUvA== 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:dkim-signature; bh=n2vqEAYjxMamt8eKicI31y8Z10SrX1vFFP0/1fJj8mo=; b=y/O2I5bKZ2r/BOMrpIgNTT4o4cJq6eo2nHqg9Lffdy1mVG7T6fl1Wh9HU7bCw2C6Q4 5Gil+WH3/RkspK2VxG8e0wp43GGxjSRKO/ylXVEQUoAcrg2tPCiv4H+Wl2JAxJZl8EaF HbzrfPg9ZrtM/lRolBhVzsVVqJg53IBDrtpRFkMpqo9Hc6RIP/wm/EaolmZhv2D7QxcV QQxPXTJIUginCYpvooSa7J2VYipcypELKzKAIsJ5QKNDrWE+bLLmReCJFpiUPVhbQu3p 0Igr0mDsh7/igUjJF8a/bjXpmQI+yT4MLW/LviVy9pWvexiLXojPQzZ4CuvR8PtffJkA 0Taw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=YUmih8bK; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x17si12309072edi.409.2020.05.26.06.21.39; Tue, 26 May 2020 06:22:03 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=YUmih8bK; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729286AbgEZNMk (ORCPT + 99 others); Tue, 26 May 2020 09:12:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727034AbgEZNMj (ORCPT ); Tue, 26 May 2020 09:12:39 -0400 Received: from mail-ot1-x343.google.com (mail-ot1-x343.google.com [IPv6:2607:f8b0:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98346C03E96D for ; Tue, 26 May 2020 06:12:39 -0700 (PDT) Received: by mail-ot1-x343.google.com with SMTP id h7so16210991otr.3 for ; Tue, 26 May 2020 06:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=n2vqEAYjxMamt8eKicI31y8Z10SrX1vFFP0/1fJj8mo=; b=YUmih8bKfVWWsaZbLiY47e25G4Cr42ZjylE5BuWJYAxtRu94dd/iSypjNWEbZwpbQP opnp34sMb6yaalrMJwFQoJzR686ehBwUOVCV1VV6TgXwVVKMefZ+4giYh3dHT+QiRaOM q0UM7wVHHY0TPLnApja+Qka1QqRUNhlP92PkoUavs5JEyRZSXr0ZkzqyVC6Vp3KVBT6v 2Q0QlE8GeDSHrCh8hApAgtaHnApbvuNRwWtdrBU1sGsC0K7QzNr+d3Lc80Y2RVg8s27h I5OD7Wq6JjcnV+Smf4FCpG4tQGBC2n6kgfJbfKf9COiReHSAIkYhzjoV1Vd9laJQyOUN iYWA== 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=n2vqEAYjxMamt8eKicI31y8Z10SrX1vFFP0/1fJj8mo=; b=DkIBkpn+Kq/N2iik9ufXjFh3FavdU25VAgLKdeW4rzjWIHk8Uy/BUJOgPjhqAMk/91 QoPYjOZ6Vn7yVjrKg7yquAi8bq79L1T24j9hor2Z+msVwi1i3l6EsoFnngZa/mBXkIf2 MGAhDuu1PGC4IS960V/Qk5aIpzNIq0bx//XRrmTxkFD1g+Sv9PZqDdJjbkpVQNHawaFE 6/kGK6t+U9ath8uOfAvvTUx3UOTmfUt/oxiA737qJYqKJQ8UKhGG+fTwAqrzUmWc2N+A AG0WZP/A9pMOH5IZ5VUvYyKCOAtOOlG+lC82WPLf0+J00pXV0Yg0SFL/GOW2uPPHG22l S5sA== X-Gm-Message-State: AOAM532C5JY4KoqSs2nwT571fY/H6ilQZuU6kMTK/HvC9kniFqKbP6eg wEXHAdH3kxHW5et+345bNL9qdIuJC0g8J+r8l1EEXg== X-Received: by 2002:a9d:518a:: with SMTP id y10mr840760otg.17.1590498758658; Tue, 26 May 2020 06:12:38 -0700 (PDT) MIME-Version: 1.0 References: <20200521142047.169334-1-elver@google.com> <20200521142047.169334-10-elver@google.com> <20200526120245.GB27166@willie-the-truck> In-Reply-To: From: Marco Elver Date: Tue, 26 May 2020 15:12:26 +0200 Message-ID: Subject: Re: [PATCH -tip v3 09/11] data_race: Avoid nested statement expression To: Arnd Bergmann 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 May 2020 at 14:19, Arnd Bergmann wrote: > > On Tue, May 26, 2020 at 2:02 PM Will Deacon wrote: > > On Tue, May 26, 2020 at 12:42:16PM +0200, Arnd Bergmann wrote: > > > > > > I find this patch only solves half the problem: it's much faster than > > > without the > > > patch, but still much slower than the current mainline version. As far as I'm > > > concerned, I think the build speed regression compared to mainline is not yet > > > acceptable, and we should try harder. > > > > > > I have not looked too deeply at it yet, but this is what I found from looking > > > at a file in a randconfig build: > > > > > > Configuration: see https://pastebin.com/raw/R9erCwNj > > > > So this .config actually has KCSAN enabled. Do you still see the slowdown > > with that disabled? > > Yes, enabling or disabling KCSAN seems to make no difference to > compile speed in this config and source file, I still get the 12 seconds > preprocessing time and 9MB file size with KCSAN disabled, possibly > a few percent smaller/faster. I actually thought that CONFIG_FTRACE > had a bigger impact, but disabling that also just reduces the time > by a few percent rather than getting it down to the expected milliseconds. > > > Although not ideal, having a longer compiler time when > > the compiler is being asked to perform instrumentation doesn't seem like a > > show-stopper to me. > > I agree in general, but building an allyesconfig kernel is still an important > use case that should not take twice as long after a small kernel change > regardless of whether a new feature is used or not. (I have not actually > compared the overall build speed for allmodconfig, as this takes a really > long time at the moment) 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 Thanks, -- Marco