Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1291312ybt; Thu, 9 Jul 2020 03:31:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznzDrF3UqKd+k7GZm+Ct6mGyFtRz8RkdPiQXvJNhQxRyj9Vrbsnq/A24AZqZkMYMC3pXZq X-Received: by 2002:a17:906:d8db:: with SMTP id re27mr54912003ejb.554.1594290706960; Thu, 09 Jul 2020 03:31:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594290706; cv=none; d=google.com; s=arc-20160816; b=GczKrDXcKxupDpvsgvrg9uNUdqlrUEMcNPc4LHaVPNqKG8rN94NtvF8Y3Of9iB/n1O NfRasikuPlR6Q08lklQUhZfQcHjNAr2r1fPSQrHdxP/xg28jSUAxpITY7gfSt5BSuAQs SC0Qv+LjZhBgbO9utsYflDgEvz8/oi+YDkq6tI5wyRH8RYNVF/JtUH4st7OFkdM686Tl wuGL5gyqX8X4Pd33ZT1TKsam2r7F8XcuZBT88dn+hBr3htNjgXqrDGoPwoRT9WcLwIQg HhCpYr54hRZD8ihX9YaHrLP8W9dChq/nS6HUE/5xKK1pE6czU+OJT3nx7/2Fm5ZMg7ta x1ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=EOZVWDThDKqF4YYFkjeMog3dbaiyIMj81bHvidkFqbM=; b=vM+S5XVwvygedcz8MVdQWMjce6aR9XTDHotqPF9ygFMuVFvbndfQtPqPW4ZepMekwt cKJVrBNJ3PJ6UW7GFjAU3aJ4kX4tPyXGsImgbSMKVsEDR+0Wb4/slEQ18WfuViA6zIxL 4h0cx88e88hqXZyX4gB+OB/mx71Qlc1dmDfUzgCrJ0jyJKWYYScEk7oB93KFE6Cbh7Oo QT8zjziYYqDSecPkDFzlxhim5ud5tBTG+JvaRqx7IElzhIJA0DSY/EkaJhIrqwqbmWsW xhNe1MOV9l/MO9AaxLC8XHfB5+1YvEshp5YJPZCXgTDZW2p3umWxe38jh5truRs7LZ9m bcKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Kp5z7mjC; 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 rn15si1648216ejb.513.2020.07.09.03.31.23; Thu, 09 Jul 2020 03:31:46 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Kp5z7mjC; 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 S1726509AbgGIKbB (ORCPT + 99 others); Thu, 9 Jul 2020 06:31:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726298AbgGIKbB (ORCPT ); Thu, 9 Jul 2020 06:31:01 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 383E3C061A0B for ; Thu, 9 Jul 2020 03:31:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=EOZVWDThDKqF4YYFkjeMog3dbaiyIMj81bHvidkFqbM=; b=Kp5z7mjCfrEn0TzLiityGZDAmg rnfM/0vw66/0HUAxCuR6ZXvmj+vyCCVzi39F8hieo4SYHYzhd/Z5b/SAAqo9alYzFEaajCd1P+5tP KqfP7vUydnwiDaZKABnoeqakHZVAmGnFyQyDV42vPZwBmmEAV+E1GqrTrv0JRv+Ttd+sIBYInvlmy EF6JHn6gApj84yC2p83QtY3nxO/JY32VD2D0xng+ooDI1vGgza6DqeCDQ8lht81PcSY27Iu7LRUjt Frpo/WqM1gNs19b76Hmxbx9F87XRlHh8lb28Lpf2bp+n6frw8jAwivE4WyNVR5wTEcLod6tcVhWCt pwtaXxFg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtTpP-0007e6-S8; Thu, 09 Jul 2020 10:30:56 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id A92CF30504E; Thu, 9 Jul 2020 12:30:54 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9B1F6285718DB; Thu, 9 Jul 2020 12:30:54 +0200 (CEST) Date: Thu, 9 Jul 2020 12:30:54 +0200 From: Peter Zijlstra To: Brian Gerst Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Andy Lutomirski , Nick Desaulniers Subject: Re: [PATCH v2 00/10] x86: Clean up percpu operations Message-ID: <20200709103054.GP597537@hirez.programming.kicks-ass.net> References: <20200530221127.459704-1-brgerst@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200530221127.459704-1-brgerst@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 30, 2020 at 06:11:17PM -0400, Brian Gerst wrote: > The core percpu operations already have a switch on the width of the > data type, which resulted in an extra amount of dead code being > generated with the x86 operations having another switch. This patch set > rewrites the x86 ops to remove the switch. Additional cleanups are to > use named assembly operands, and to cast variables to the width used in > the assembly to make Clang happy. > > Changes from v1: > - Add separate patch for XADD constraint fix > - Fixed sparse truncation warning > - Add cleanup of percpu_stable_op() > - Add patch to Remove PER_CPU() > > Brian Gerst (10): > x86/percpu: Introduce size abstraction macros > x86/percpu: Clean up percpu_to_op() > x86/percpu: Clean up percpu_from_op() > x86/percpu: Clean up percpu_add_op() > x86/percpu: Remove "e" constraint from XADD > x86/percpu: Clean up percpu_add_return_op() > x86/percpu: Clean up percpu_xchg_op() > x86/percpu: Clean up percpu_cmpxchg_op() > x86/percpu: Clean up percpu_stable_op() > x86/percpu: Remove unused PER_CPU() macro > > arch/x86/include/asm/percpu.h | 510 ++++++++++++---------------------- > 1 file changed, 172 insertions(+), 338 deletions(-) Nice! Acked-by: Peter Zijlstra (Intel)