From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 315BDC43381 for ; Mon, 1 Apr 2019 09:25:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 048772086C for ; Mon, 1 Apr 2019 09:25:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726163AbfDAJZ4 (ORCPT ); Mon, 1 Apr 2019 05:25:56 -0400 Received: from mga12.intel.com ([192.55.52.136]:1750 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725821AbfDAJZ4 (ORCPT ); Mon, 1 Apr 2019 05:25:56 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Apr 2019 02:25:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,296,1549958400"; d="scan'208";a="136518896" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by fmsmga008.fm.intel.com with ESMTP; 01 Apr 2019 02:25:54 -0700 Received: from andy by smile with local (Exim 4.92) (envelope-from ) id 1hAtCU-0003Rz-0l; Mon, 01 Apr 2019 12:25:54 +0300 Date: Mon, 1 Apr 2019 12:25:54 +0300 From: Andy Shevchenko To: Andrey Abramov , Linux Kernel Mailing List Subject: Re: [PATCH v2 0/5] simple sort swap function improvements Message-ID: <20190401092554.GC9224@smile.fi.intel.com> References: <19606671554056883@myt3-1179f584969c.qloud-c.yandex.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19606671554056883@myt3-1179f584969c.qloud-c.yandex.net> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 31, 2019 at 09:28:03PM +0300, Andrey Abramov wrote: > This is the logical continuation of the "lib/sort & lib/list_sort: > faster and smaller" series by George Spelvin (added to linux-next > recently). > > Since Spectre mitigations have made indirect function calls more > expensive, and the previous patch series implements the default > simple byte copies without them, an "optimized" custom swap > function is now a waste of time as well as code. > > Patches 1 to 4 replace trivial swap functions with the built-in > (which is now much faster) and are grouped by subsystem. > Being pure code deletion patches, they are sure to bring joy to > Linus's heart. > > Having reviewed all call sites, only three non-trivial swap > functions remain: arch/x86/kernel/unwind_orc.c, > kernel/jump_label.c and lib/extable.c. > > Patch #5 takes the opportunity to clean up a long-standing > interface wart: the swap function's size parameter was an int, > which doesn't match the size_t element size passed to sort() > function itself. So change it to size_t. > > v1->v2: Only commit messages have changed to better explain > the purpose of commits. (Thanks to George Spelvin and Greg KH) Thanks for an update. Hint: scripts/get_maintainer.pl --git --git-min-percent=67 ... (Note 67% magic value) > > Andrey Abramov (5): > arch/arc: unwind.c: replace swap function with built-in one > powerpc: module_[32|64].c: replace swap function with built-in one > ocfs2: dir,refcounttree,xattr: replace swap functions with built-in > one > ubifs: find.c: replace swap function with built-in one > Lib: sort.h: replace int size with size_t size in the swap function > > arch/arc/kernel/unwind.c | 20 ++------------------ > arch/powerpc/kernel/module_32.c | 17 +---------------- > arch/powerpc/kernel/module_64.c | 17 +---------------- > arch/x86/kernel/unwind_orc.c | 2 +- > fs/ocfs2/dir.c | 13 +------------ > fs/ocfs2/refcounttree.c | 13 +++---------- > fs/ocfs2/xattr.c | 15 +++------------ > fs/ubifs/find.c | 9 +-------- > include/linux/sort.h | 2 +- > kernel/jump_label.c | 2 +- > lib/extable.c | 2 +- > lib/sort.c | 6 +++--- > 12 files changed, 19 insertions(+), 99 deletions(-) > > -- > 2.21.0 > > -- With Best Regards, Andy Shevchenko