From patchwork Tue Apr 2 20:41:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Abramov X-Patchwork-Id: 1074928 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=yandex.ru Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="o3ZDxOwu"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=yandex.ru header.i=@yandex.ru header.b="tjPKIU2c"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44Yh3S0fsQz9sQr for ; Wed, 3 Apr 2019 07:42:24 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:MIME-Version:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=rH7EkQOXxnmS5Q85jdsA4CTUSbkQIDdIx1Yyz9YtNhU=; b=o3ZDxOwujzyrKL BhEgVwObdrsaURy0sgtFGdg/SFcgie10s8vQGBcUPGkPpO5Pg01AFMK122KuI29TbCLHMDdxBTujl FFA57WbgaeTHzKrdvQWLoh4N3xY0KRxmOSRd7lZG9Klv1OhP67li0BN2rcDQlpWj1cfQYQL55PsIu tOzDSt4VYPlnikQ0C3jjX9WUd/DzScXaq4UYOl0LT58Po1qe9D6rtWlSspKAGGBFY1vYJMcarIPci RWW1c0xX3ZzNeIBy3oL03fTbw1BPDlD5JGWaDBXuU7Z0cKb6w66YieeQt9Ow+ycoBkxQuzt+eXGKs 7dK78nCYoGdmIZrzRQ+A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBQEg-00086j-7w; Tue, 02 Apr 2019 20:42:22 +0000 Received: from forward102j.mail.yandex.net ([5.45.198.243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBQEU-0007z5-RO; Tue, 02 Apr 2019 20:42:13 +0000 Received: from mxback5j.mail.yandex.net (mxback5j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10e]) by forward102j.mail.yandex.net (Yandex) with ESMTP id 3945DF21601; Tue, 2 Apr 2019 23:41:58 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback5j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id hTyhEB7C0p-fpP4KXkT; Tue, 02 Apr 2019 23:41:56 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1554237716; bh=nlyxbITpbpWV++WUuQA9wS2TeXvU+5JCwzDJix4Usoo=; h=Message-Id:Date:Cc:Subject:To:From; b=tjPKIU2cCaEXSiHfxcru19tJ8/TstdyLtuyZwbPA/Sq8/Gmk0DSG7NmMB3QjZfxej ZvTyUnmAzsfjexhu96Zg6jg/bf/suid9Ehsx7yASkCSTZF0Lk+SsLUMMpZKaZH7Xh1 yOEx6yM/ABY452UdMwGN416SaPeiKcOONAEazK0I= Authentication-Results: mxback5j.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by sas1-23a37bc8251c.qloud-c.yandex.net with HTTP; Tue, 02 Apr 2019 23:41:51 +0300 From: Andrey Abramov To: vgupta , benh , paulus , Michael Ellerman , tglx , mingo , bp , hpa , x86 , mark , jlbec , richard , dedekind1 , adrian.hunter , gregkh , naveen.n.rao , jpoimboe , Dave Chinner , darrick.wong , ard.biesheuvel , George Spelvin , linux-snps-arc , Linux Kernel Mailing List , linuxppc-dev , ocfs2-devel , linux-mtd , sfr Subject: [PATCH v3 0/5] simple sort swap function improvements MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 02 Apr 2019 23:41:51 +0300 Message-Id: <824481554237711@sas1-23a37bc8251c.qloud-c.yandex.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190402_134211_395254_1B8DCB3E X-CRM114-Status: UNSURE ( 5.79 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [5.45.198.243 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (st5pub[at]yandex.ru) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mhocko , gustavo , peterz , amir73il , Rasmus Villemoes , kamalesh , piaojun , "yamada.masahiro" , "jiang.biao2" , jslaby , yuehaibing , rppt , "ge.changwei" , keescook , jannh , "ashish.samant" , npiggin , jiangyiwen , Andy Shevchenko , lchen , malat , Morton Andrew Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 removes size argument from the swap function because: 1) It wasn't used. 2) Custom swap function knows what kind of objects it swaps, so it already knows their sizes. v1->v2: Only commit messages have changed to better explain the purpose of commits. (Thanks to George Spelvin and Greg KH) v2->v3: Patch #5 now completely removes the size argument 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: remove the size argument from 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 | 7 +++---- 12 files changed, 19 insertions(+), 100 deletions(-)