Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2992501ybk; Mon, 18 May 2020 13:02:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyc+FjXEnO9EYwGOUr4f301LbHARqr06ovgkBQiuB8TUi3fC6tIZ3DPY03LyucUCr4wbxvA X-Received: by 2002:a17:906:4d88:: with SMTP id s8mr16762880eju.193.1589832178701; Mon, 18 May 2020 13:02:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589832178; cv=none; d=google.com; s=arc-20160816; b=DaqEX08xyrQUdYV8fDVRAfyPuRYgywS1wcs40toUtNuJpMyNFnpH3GE5DVS0/jOPN3 a7+iR+hoUDoiPN/lLbBJi6W9vmRKWB4tHvKAKx58Fq1MpNJEYZhW46jp+Cj6cGxjHK0I eY7Jn0fwjX25t0qPZXhWTBTA2RSG2jOP5QFJqhHcLaYwrCcyBUqMoDN1kn0JS3icowXi YtwCdoQ7UsNNPq6gjxziaThpJIytuxZ/rHbzS8XskHyjd70b47lnRGzl3yhAdv1pfyai FR1lhftAXzC42hA814Ttea8hunVgPeW9qPb9cSv7Nj7TEPvvcWVwcqLES/XVGtHnsSru /8+w== 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=VYS01OjV1B1pDC2qLVF5XfomrtGwxD3ytYuCh/dfTzY=; b=mb5Mx19EW3qeozpYnSM6epe+XQvXRD2fyZassHJfcZ3shK0R4lpyEDZKOdD9rI1/tT C5DNrP8SygsNA/bVsJy77ah7a4ajxevT02jDaQS+nTyHMKLs5Wdyfj9aqBKmwUQNwB7Q tQ6QZG1rOQjf2AUtuW8j+lNUuiSpT3QlIj22XwEkZJ7eshpUE3dMTG+5tw5EIe5oY5I9 AQoh7vfm0HqSdY7WTYW2/dVmWonBvikRnQB/Ia9p7tKaoLIXo1cHX5VLmTJ6ehrHCVAK E2/Pnl/HphhaFJEax03mZ5ZgihuRZuZEPOlOoadP8P4+tjPmOpf2WOYodpbLg+AbivGt 2Hrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ks95EGnG; 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 ce18si7675662edb.26.2020.05.18.13.02.35; Mon, 18 May 2020 13:02:58 -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=Ks95EGnG; 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 S1727885AbgERTUN (ORCPT + 99 others); Mon, 18 May 2020 15:20:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727835AbgERTUM (ORCPT ); Mon, 18 May 2020 15:20:12 -0400 Received: from mail-vs1-xe43.google.com (mail-vs1-xe43.google.com [IPv6:2607:f8b0:4864:20::e43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EC50C061A0C for ; Mon, 18 May 2020 12:20:12 -0700 (PDT) Received: by mail-vs1-xe43.google.com with SMTP id o26so6298922vsr.10 for ; Mon, 18 May 2020 12:20:12 -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=VYS01OjV1B1pDC2qLVF5XfomrtGwxD3ytYuCh/dfTzY=; b=Ks95EGnG9KKdVC+Ep/9VkmIS5FtzjDj70JpeLlQ3TtrwydvRG23Dy6xF0j1hiQt3Sy tEjDfjvTnUglUqvlru+5Dfq57HTRBMOujnWkuNxe9xx5mZYx3S11hCuiXQ6lgz469Fsh XuIw5W2dEx9FaF+6P9WecvJ4a62OOr7BmfBNgVTiFy5IZAdpT33icyPxNGc0oSOqFbv8 fJjDqzRSoUSZ5SkpNWdeJuUwSYtfottzzYzUSyeCmbFXGBnEtGOe2VtfdyYP+p9kQ9oZ MDEGT5Gk8raAta2BfZVJAGSgqXah9d0Kh0j1aK8nBKVjFYn+T++QaoDPt+siHqcpuv9H 5NEw== 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=VYS01OjV1B1pDC2qLVF5XfomrtGwxD3ytYuCh/dfTzY=; b=Sw3uyozpZMFk4alcmLPFPprUlH9MD62zh55P3K8yp948zYVorGrSRICUSHDsmn0Hhs bruIAoxFozl+tDnGxg7dIN7ZHQykiAlSAfRl95jInH7dYip4xKlWpYsTfS3r2rGo1PB4 e4AA8g1oxihIDLVv6LDKTno6VP7EVFLYVTSUSWiVnfvaENbfnNntWWZt9IvRX7Qg6blB ODaJkn9K1FkMdRNkR6apacCXJIXiDrwPx3oRdWlkUSjNw7CPazfR1JCC0DdDupgwTfN1 RRU3u3516M7EFmwsu+sXQf8zX6fMQuPmjwLbue/Brp+6LEysPuwWiTz56PtrkkBikJNg Nj7Q== X-Gm-Message-State: AOAM530KTgUsfdyJKw28Bf8lbAiSimyiYC6uAtf4chUtgO//sXC4jZ9d bvnDhPkWwrh7ektGX56bbwwrtsO3biHhcwAAqUDrKw== X-Received: by 2002:a67:d60b:: with SMTP id n11mr2312109vsj.143.1589829611381; Mon, 18 May 2020 12:20:11 -0700 (PDT) MIME-Version: 1.0 References: <20200517152916.3146539-1-brgerst@gmail.com> In-Reply-To: <20200517152916.3146539-1-brgerst@gmail.com> From: Nick Desaulniers Date: Mon, 18 May 2020 12:19:59 -0700 Message-ID: Subject: Re: [PATCH 0/7] x86: Clean up percpu operations To: Brian Gerst Cc: LKML , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Andy Lutomirski , Peter Zijlstra 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 Sun, May 17, 2020 at 8:29 AM 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 Thanks for the series Brian. The duplication between knowing the size at the call site and the switch is exactly what I picked up on, too. This past weekend I started a similar cleanup, but only got through 2 of the 6 functions you cleaned up. And via quick glance, your series looks much better than mine does. I'll sit down and review+test these after lunch. I appreciate you taking the time to create this series. > 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. > > Brian Gerst (7): > 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: Clean up percpu_add_return_op() > x86/percpu: Clean up percpu_xchg_op() > x86/percpu: Clean up percpu_cmpxchg_op() > > arch/x86/include/asm/percpu.h | 447 ++++++++++++---------------------- > 1 file changed, 158 insertions(+), 289 deletions(-) > > -- > 2.25.4 > -- Thanks, ~Nick Desaulniers