Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp806606iog; Thu, 30 Jun 2022 10:27:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tVecaB6u//8pqAVu2uFRML9KodH8uyCIRj97LVPMlYjIlsChUl1yp9FbIq37FW1UpxGJCa X-Received: by 2002:a17:907:3e94:b0:726:3b46:ba20 with SMTP id hs20-20020a1709073e9400b007263b46ba20mr9935965ejc.314.1656610024719; Thu, 30 Jun 2022 10:27:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656610024; cv=none; d=google.com; s=arc-20160816; b=VaUOYtfy4/kOuCbJj1xDaiMX3xTl93Xg51AXjlWqcnIS29vX8HjscL1QtJ6R4awJ1v ycyp2ftV/SW9bT49d9wW3xVzndhTzq+gOQ3FdRLtl9OpyRwRbiMRUC2HE16UQDM9XKSv YOpfMr6Z+tZ/HUK133VySSrzCIKWjpCYgnoyXkHHIbc7y8wwRcBHwuUorAjRRG7kbg/7 gT1rBwRsFFLYx0DXBQzOYDg5ItF3nfsvBi7iii5PEamdguE+4+FRzrTcuBHd1Qu4OGwu I8l9l78RF7f82IEHPgFomjnUNOHZKqhXAHu8bNxHe9SsL9Z3dEftVOe/DqRQBnLNzc63 AbPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=g+UJGeKH/3KPVtzd0+o8ipHkyUP4/0i2MSh7OvSpbdc=; b=n90968kaBLbKcp8tDYm37kpIBTUVDT20fo+1vp/+13tTDcRVkP4vsMIM++9ifOQ5kb 0fnFYxbDzl097zD5qfQh1oJ31SYdfLBmjCRa1JNrXrZVMJJYARu8kvmn/rX2LEl6eO1f onsq2oEpRfaPguzsesQcVrCqS5kauSsriA8z23+GvKxxbbL76UkMDQZOAisNK14cDopj g+YdCmdmca9aVYnFn8pbFww8rY/kJFow24IEA57uqJOQz4ep+Et9P9GSQFUbGP4BePTs pdazU/1F3estCzvH6cnREwZwVWEaKrC8BRXbteC5q7H3Mvj6bgIwHKHY8ZurXIwgmTdk ZDTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="fmrnj/6X"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf9-20020a1709077f0900b00726c7fc61d6si14609684ejc.851.2022.06.30.10.26.38; Thu, 30 Jun 2022 10:27:04 -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=@intel.com header.s=Intel header.b="fmrnj/6X"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236072AbiF3Q5L (ORCPT + 99 others); Thu, 30 Jun 2022 12:57:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230223AbiF3Q5J (ORCPT ); Thu, 30 Jun 2022 12:57:09 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B188393DC; Thu, 30 Jun 2022 09:57:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656608229; x=1688144229; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bL9nkQHpWXRcPQiclQNvTJObFea+2bIOo5Icywa3vMA=; b=fmrnj/6XuSpY1hnOWZabHa7oDtPIZ/7Bh+RzopLp14OHknBAX57nHps+ hL5jBriVpX/QkW93R0zu0Im+Scz9SCMknY/iOCVSHSS2S8n+mKecZgyHQ Bj7eBMp9wg9++qnorxgkRFae5QI68Ufol1Zw3FVTWM9ltXapLCo//Tj26 9Kxt8LZ2qLG3s4QZZ6QJUPHIBI+jiJrwD8thm/mMC7PGeyX+J3CV/8SMn PUlmia2grWt0+sj7f7hIdMOsNypeNBNyPtP/nF2FJrYVf6/8tUDwXrhTm a/SMH+lmmn9h8jAOslm763iFDv28yTpVnQqU9eUHwUpe3DyX9d9HKP6LI Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10394"; a="271175238" X-IronPort-AV: E=Sophos;i="5.92,234,1650956400"; d="scan'208";a="271175238" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2022 09:57:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,234,1650956400"; d="scan'208";a="623800223" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by orsmga001.jf.intel.com with ESMTP; 30 Jun 2022 09:57:02 -0700 Received: from newjersey.igk.intel.com (newjersey.igk.intel.com [10.102.20.203]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 25UGv0GF022621; Thu, 30 Jun 2022 17:57:00 +0100 From: Alexander Lobakin To: Yury Norov Cc: Alexander Lobakin , Arnd Bergmann , Andy Shevchenko , Mark Rutland , Matt Turner , Brian Cain , Geert Uytterhoeven , Yoshinori Sato , Rich Felker , "David S. Miller" , Kees Cook , "Peter Zijlstra (Intel)" , Marco Elver , Borislav Petkov , Tony Luck , Maciej Fijalkowski , Jesse Brandeburg , Greg Kroah-Hartman , Nathan Chancellor , Nick Desaulniers , Tom Rix , kernel test robot , linux-alpha@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 0/9] bitops: let optimize out non-atomic bitops on compile-time constants Date: Thu, 30 Jun 2022 18:56:11 +0200 Message-Id: <20220630165611.1551808-1-alexandr.lobakin@intel.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624121313.2382500-1-alexandr.lobakin@intel.com> References: <20220624121313.2382500-1-alexandr.lobakin@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Alexander Lobakin Date: Fri, 24 Jun 2022 14:13:04 +0200 > While I was working on converting some structure fields from a fixed > type to a bitmap, I started observing code size increase not only in > places where the code works with the converted structure fields, but > also where the converted vars were on the stack. That said, the > following code: Hey, Seems like everything is fine this time. I got some reports, but those aren't caused by any of the changes from the series. Maybe we can take it to -next and see how it goes? [...] > arch/alpha/include/asm/bitops.h | 32 ++-- > arch/hexagon/include/asm/bitops.h | 24 ++- > arch/ia64/include/asm/bitops.h | 42 ++--- > arch/ia64/include/asm/processor.h | 2 +- > arch/m68k/include/asm/bitops.h | 49 ++++-- > arch/s390/include/asm/bitops.h | 61 +++---- > arch/sh/include/asm/bitops-op32.h | 34 ++-- > arch/sparc/include/asm/bitops_32.h | 18 +- > arch/sparc/lib/atomic32.c | 12 +- > arch/x86/include/asm/bitops.h | 22 +-- > drivers/net/ethernet/intel/ice/ice_switch.c | 2 +- > .../asm-generic/bitops/generic-non-atomic.h | 161 ++++++++++++++++++ > .../bitops/instrumented-non-atomic.h | 35 ++-- > include/asm-generic/bitops/non-atomic.h | 121 +------------ > .../bitops/non-instrumented-non-atomic.h | 16 ++ > include/linux/bitmap.h | 22 ++- > include/linux/bitops.h | 50 ++++++ > lib/test_bitmap.c | 62 +++++++ > tools/include/asm-generic/bitops/non-atomic.h | 34 ++-- > tools/include/linux/bitops.h | 16 ++ > 20 files changed, 544 insertions(+), 271 deletions(-) > create mode 100644 include/asm-generic/bitops/generic-non-atomic.h > create mode 100644 include/asm-generic/bitops/non-instrumented-non-atomic.h > > -- > 2.36.1 Thanks, Olek